diff --git a/CHANGELOG.md b/CHANGELOG.md index fa4d35e..ff63134 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,28 @@ -# Change Log \ No newline at end of file +# Change Log + +## 11.1.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `dart38` and `flutter332` support to runtime models +* Add `gif` support to `ImageFormat` enum +* Add `upsertDocument` support to `Databases` service + +## 11.0.0 + +* Add `` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Update enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Remove `search` param from `listExecutions` method + +## 10.0.0 + +* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests + +## 9.0.3 + +* Update sdk to use Numpy-style docstrings diff --git a/README.md b/README.md index c16cd61..a68a5ae 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Appwrite Python SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.6.2-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK is compatible with Appwrite server version 1.6.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).** +**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/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) diff --git a/appwrite/client.py b/appwrite/client.py index 2548979..ed4d4b5 100644 --- a/appwrite/client.py +++ b/appwrite/client.py @@ -14,12 +14,12 @@ def __init__(self): self._endpoint = 'https://cloud.appwrite.io/v1' self._global_headers = { 'content-type': '', - 'user-agent' : f'AppwritePythonSDK/10.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})', + 'user-agent' : f'AppwritePythonSDK/11.1.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})', 'x-sdk-name': 'Python', 'x-sdk-platform': 'server', 'x-sdk-language': 'python', - 'x-sdk-version': '10.0.0', - 'X-Appwrite-Response-Format' : '1.6.0', + 'x-sdk-version': '11.1.0', + 'X-Appwrite-Response-Format' : '1.7.0', } def set_self_signed(self, status=True): diff --git a/appwrite/encoders/value_class_encoder.py b/appwrite/encoders/value_class_encoder.py index 95b06b7..72297a5 100644 --- a/appwrite/encoders/value_class_encoder.py +++ b/appwrite/encoders/value_class_encoder.py @@ -9,10 +9,15 @@ from ..enums.relation_mutate import RelationMutate from ..enums.index_type import IndexType from ..enums.runtime import Runtime +from ..enums.vcs_deployment_type import VCSDeploymentType +from ..enums.deployment_download_type import DeploymentDownloadType from ..enums.execution_method import ExecutionMethod from ..enums.name import Name from ..enums.message_priority import MessagePriority from ..enums.smtp_encryption import SmtpEncryption +from ..enums.framework import Framework +from ..enums.build_runtime import BuildRuntime +from ..enums.adapter import Adapter from ..enums.compression import Compression from ..enums.image_gravity import ImageGravity from ..enums.image_format import ImageFormat @@ -51,6 +56,12 @@ def default(self, o): if isinstance(o, Runtime): return o.value + if isinstance(o, VCSDeploymentType): + return o.value + + if isinstance(o, DeploymentDownloadType): + return o.value + if isinstance(o, ExecutionMethod): return o.value @@ -63,6 +74,15 @@ def default(self, o): if isinstance(o, SmtpEncryption): return o.value + if isinstance(o, Framework): + return o.value + + if isinstance(o, BuildRuntime): + return o.value + + if isinstance(o, Adapter): + return o.value + if isinstance(o, Compression): return o.value diff --git a/appwrite/enums/adapter.py b/appwrite/enums/adapter.py new file mode 100644 index 0000000..821aa24 --- /dev/null +++ b/appwrite/enums/adapter.py @@ -0,0 +1,5 @@ +from enum import Enum + +class Adapter(Enum): + STATIC = "static" + SSR = "ssr" diff --git a/appwrite/enums/build_runtime.py b/appwrite/enums/build_runtime.py new file mode 100644 index 0000000..aded697 --- /dev/null +++ b/appwrite/enums/build_runtime.py @@ -0,0 +1,68 @@ +from enum import Enum + +class BuildRuntime(Enum): + NODE_14_5 = "node-14.5" + NODE_16_0 = "node-16.0" + NODE_18_0 = "node-18.0" + NODE_19_0 = "node-19.0" + NODE_20_0 = "node-20.0" + NODE_21_0 = "node-21.0" + NODE_22 = "node-22" + PHP_8_0 = "php-8.0" + PHP_8_1 = "php-8.1" + PHP_8_2 = "php-8.2" + PHP_8_3 = "php-8.3" + RUBY_3_0 = "ruby-3.0" + RUBY_3_1 = "ruby-3.1" + RUBY_3_2 = "ruby-3.2" + RUBY_3_3 = "ruby-3.3" + PYTHON_3_8 = "python-3.8" + PYTHON_3_9 = "python-3.9" + PYTHON_3_10 = "python-3.10" + PYTHON_3_11 = "python-3.11" + PYTHON_3_12 = "python-3.12" + PYTHON_ML_3_11 = "python-ml-3.11" + PYTHON_ML_3_12 = "python-ml-3.12" + DENO_1_21 = "deno-1.21" + DENO_1_24 = "deno-1.24" + DENO_1_35 = "deno-1.35" + DENO_1_40 = "deno-1.40" + DENO_1_46 = "deno-1.46" + DENO_2_0 = "deno-2.0" + DART_2_15 = "dart-2.15" + DART_2_16 = "dart-2.16" + DART_2_17 = "dart-2.17" + DART_2_18 = "dart-2.18" + DART_2_19 = "dart-2.19" + DART_3_0 = "dart-3.0" + DART_3_1 = "dart-3.1" + DART_3_3 = "dart-3.3" + DART_3_5 = "dart-3.5" + DART_3_8 = "dart-3.8" + DOTNET_6_0 = "dotnet-6.0" + DOTNET_7_0 = "dotnet-7.0" + DOTNET_8_0 = "dotnet-8.0" + JAVA_8_0 = "java-8.0" + JAVA_11_0 = "java-11.0" + JAVA_17_0 = "java-17.0" + JAVA_18_0 = "java-18.0" + JAVA_21_0 = "java-21.0" + JAVA_22 = "java-22" + SWIFT_5_5 = "swift-5.5" + SWIFT_5_8 = "swift-5.8" + SWIFT_5_9 = "swift-5.9" + SWIFT_5_10 = "swift-5.10" + KOTLIN_1_6 = "kotlin-1.6" + KOTLIN_1_8 = "kotlin-1.8" + KOTLIN_1_9 = "kotlin-1.9" + KOTLIN_2_0 = "kotlin-2.0" + CPP_17 = "cpp-17" + CPP_20 = "cpp-20" + BUN_1_0 = "bun-1.0" + BUN_1_1 = "bun-1.1" + GO_1_23 = "go-1.23" + STATIC_1 = "static-1" + FLUTTER_3_24 = "flutter-3.24" + FLUTTER_3_27 = "flutter-3.27" + FLUTTER_3_29 = "flutter-3.29" + FLUTTER_3_32 = "flutter-3.32" diff --git a/appwrite/enums/deployment_download_type.py b/appwrite/enums/deployment_download_type.py new file mode 100644 index 0000000..e26e2d5 --- /dev/null +++ b/appwrite/enums/deployment_download_type.py @@ -0,0 +1,5 @@ +from enum import Enum + +class DeploymentDownloadType(Enum): + SOURCE = "source" + OUTPUT = "output" diff --git a/appwrite/enums/framework.py b/appwrite/enums/framework.py new file mode 100644 index 0000000..b3a9fb6 --- /dev/null +++ b/appwrite/enums/framework.py @@ -0,0 +1,17 @@ +from enum import Enum + +class Framework(Enum): + ANALOG = "analog" + ANGULAR = "angular" + NEXTJS = "nextjs" + REACT = "react" + NUXT = "nuxt" + VUE = "vue" + SVELTEKIT = "sveltekit" + ASTRO = "astro" + REMIX = "remix" + LYNX = "lynx" + FLUTTER = "flutter" + REACT_NATIVE = "react-native" + VITE = "vite" + OTHER = "other" diff --git a/appwrite/enums/image_format.py b/appwrite/enums/image_format.py index ba2f59e..332f646 100644 --- a/appwrite/enums/image_format.py +++ b/appwrite/enums/image_format.py @@ -3,8 +3,8 @@ class ImageFormat(Enum): JPG = "jpg" JPEG = "jpeg" - GIF = "gif" PNG = "png" WEBP = "webp" HEIC = "heic" AVIF = "avif" + GIF = "gif" diff --git a/appwrite/enums/runtime.py b/appwrite/enums/runtime.py index 1485f48..b0e307a 100644 --- a/appwrite/enums/runtime.py +++ b/appwrite/enums/runtime.py @@ -22,6 +22,7 @@ class Runtime(Enum): PYTHON_3_11 = "python-3.11" PYTHON_3_12 = "python-3.12" PYTHON_ML_3_11 = "python-ml-3.11" + PYTHON_ML_3_12 = "python-ml-3.12" DENO_1_21 = "deno-1.21" DENO_1_24 = "deno-1.24" DENO_1_35 = "deno-1.35" @@ -32,10 +33,12 @@ class Runtime(Enum): DART_2_16 = "dart-2.16" DART_2_17 = "dart-2.17" DART_2_18 = "dart-2.18" + DART_2_19 = "dart-2.19" DART_3_0 = "dart-3.0" DART_3_1 = "dart-3.1" DART_3_3 = "dart-3.3" DART_3_5 = "dart-3.5" + DART_3_8 = "dart-3.8" DOTNET_6_0 = "dotnet-6.0" DOTNET_7_0 = "dotnet-7.0" DOTNET_8_0 = "dotnet-8.0" @@ -60,3 +63,6 @@ class Runtime(Enum): GO_1_23 = "go-1.23" STATIC_1 = "static-1" FLUTTER_3_24 = "flutter-3.24" + FLUTTER_3_27 = "flutter-3.27" + FLUTTER_3_29 = "flutter-3.29" + FLUTTER_3_32 = "flutter-3.32" diff --git a/appwrite/enums/vcs_deployment_type.py b/appwrite/enums/vcs_deployment_type.py new file mode 100644 index 0000000..d78e99f --- /dev/null +++ b/appwrite/enums/vcs_deployment_type.py @@ -0,0 +1,6 @@ +from enum import Enum + +class VCSDeploymentType(Enum): + BRANCH = "branch" + COMMIT = "commit" + TAG = "tag" diff --git a/appwrite/services/account.py b/appwrite/services/account.py index 9dd3c5e..6062ad4 100644 --- a/appwrite/services/account.py +++ b/appwrite/services/account.py @@ -35,6 +35,7 @@ def create(self, user_id: str, email: str, password: str, name: str = None) -> D """ 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](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession). + Parameters ---------- user_id : str @@ -84,6 +85,7 @@ def update_email(self, email: str, password: str) -> Dict[str, Any]: This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. + Parameters ---------- email : str @@ -122,6 +124,7 @@ def list_identities(self, queries: List[str] = None) -> Dict[str, Any]: """ Get the list of identities for the currently logged in user. + Parameters ---------- queries : List[str] @@ -150,6 +153,7 @@ def delete_identity(self, identity_id: str) -> Dict[str, Any]: """ Delete an identity by its unique ID. + Parameters ---------- identity_id : str @@ -204,6 +208,7 @@ def list_logs(self, queries: List[str] = None) -> Dict[str, Any]: """ Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log. + Parameters ---------- queries : List[str] @@ -232,6 +237,7 @@ def update_mfa(self, mfa: bool) -> Dict[str, Any]: """ Enable or disable MFA on an account. + Parameters ---------- mfa : bool @@ -264,6 +270,7 @@ def create_mfa_authenticator(self, type: AuthenticatorType) -> Dict[str, Any]: """ Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. + Parameters ---------- type : AuthenticatorType @@ -296,6 +303,7 @@ def update_mfa_authenticator(self, type: AuthenticatorType, otp: str) -> Dict[st """ Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. + Parameters ---------- type : AuthenticatorType @@ -334,6 +342,7 @@ def delete_mfa_authenticator(self, type: AuthenticatorType) -> Dict[str, Any]: """ Delete an authenticator for a user by ID. + Parameters ---------- type : AuthenticatorType @@ -366,6 +375,7 @@ def create_mfa_challenge(self, factor: AuthenticationFactor) -> Dict[str, Any]: """ Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. + Parameters ---------- factor : AuthenticationFactor @@ -398,6 +408,7 @@ def update_mfa_challenge(self, challenge_id: str, otp: str) -> Dict[str, Any]: """ Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. + Parameters ---------- challenge_id : str @@ -522,6 +533,7 @@ def update_name(self, name: str) -> Dict[str, Any]: """ Update currently logged in user account name. + Parameters ---------- name : str @@ -554,6 +566,7 @@ def update_password(self, password: str, old_password: str = None) -> Dict[str, """ Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional. + Parameters ---------- password : str @@ -589,6 +602,7 @@ def update_phone(self, phone: str, password: str) -> Dict[str, Any]: """ Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. + Parameters ---------- phone : str @@ -648,6 +662,7 @@ def update_prefs(self, prefs: dict) -> Dict[str, Any]: """ Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. + Parameters ---------- prefs : dict @@ -680,6 +695,7 @@ def create_recovery(self, email: str, url: str) -> Dict[str, Any]: """ 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](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. + Parameters ---------- email : str @@ -720,6 +736,7 @@ def update_recovery(self, user_id: str, secret: str, password: str) -> Dict[str, 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 ---------- user_id : str @@ -831,6 +848,7 @@ def create_email_password_session(self, email: str, password: str) -> Dict[str, A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + Parameters ---------- email : str @@ -869,6 +887,7 @@ def update_magic_url_session(self, user_id: str, secret: str) -> Dict[str, Any]: """ Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. + Parameters ---------- user_id : str @@ -907,6 +926,7 @@ def update_phone_session(self, user_id: str, secret: str) -> Dict[str, Any]: """ Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. + Parameters ---------- user_id : str @@ -945,6 +965,7 @@ def create_session(self, user_id: str, secret: str) -> Dict[str, Any]: """ Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. + Parameters ---------- user_id : str @@ -983,6 +1004,7 @@ def get_session(self, session_id: str) -> Dict[str, Any]: """ Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used. + Parameters ---------- session_id : str @@ -1014,6 +1036,7 @@ def update_session(self, session_id: str) -> Dict[str, Any]: """ Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider. + Parameters ---------- session_id : str @@ -1046,6 +1069,7 @@ def delete_session(self, session_id: str) -> Dict[str, Any]: """ Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead. + Parameters ---------- session_id : str @@ -1102,6 +1126,7 @@ def create_email_token(self, user_id: str, email: str, phrase: bool = None) -> D A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + Parameters ---------- user_id : str @@ -1146,6 +1171,7 @@ def create_magic_url_token(self, user_id: str, email: str, url: str = None, phra A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + Parameters ---------- user_id : str @@ -1194,6 +1220,7 @@ def create_o_auth2_token(self, provider: OAuthProvider, success: str = None, fai A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + Parameters ---------- provider : OAuthProvider @@ -1236,6 +1263,7 @@ def create_phone_token(self, user_id: str, phone: str) -> Dict[str, Any]: A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + Parameters ---------- user_id : str @@ -1277,6 +1305,7 @@ def create_verification(self, url: str) -> Dict[str, Any]: 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 ---------- url : str @@ -1309,6 +1338,7 @@ def update_verification(self, user_id: str, secret: str) -> Dict[str, Any]: """ 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 ---------- user_id : str @@ -1369,6 +1399,7 @@ def update_phone_verification(self, user_id: str, secret: str) -> Dict[str, Any] """ Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code. + Parameters ---------- user_id : str diff --git a/appwrite/services/avatars.py b/appwrite/services/avatars.py index 36e15d8..2bd32f7 100644 --- a/appwrite/services/avatars.py +++ b/appwrite/services/avatars.py @@ -16,6 +16,7 @@ def get_browser(self, code: Browser, width: float = None, height: float = None, When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + Parameters ---------- code : Browser @@ -25,7 +26,7 @@ def get_browser(self, code: Browser, width: float = None, height: float = None, height : float Image height. Pass an integer between 0 to 2000. Defaults to 100. quality : float - Image quality. Pass an integer between 0 to 100. Defaults to 100. + Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. Returns ------- @@ -59,6 +60,7 @@ def get_credit_card(self, code: CreditCard, width: float = None, height: float = When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + Parameters ---------- code : CreditCard @@ -68,7 +70,7 @@ def get_credit_card(self, code: CreditCard, width: float = None, height: float = height : float Image height. Pass an integer between 0 to 2000. Defaults to 100. quality : float - Image quality. Pass an integer between 0 to 100. Defaults to 100. + Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. Returns ------- @@ -101,6 +103,7 @@ def get_favicon(self, url: str) -> bytes: This endpoint does not follow HTTP redirects. + Parameters ---------- url : str @@ -135,6 +138,7 @@ def get_flag(self, code: Flag, width: float = None, height: float = None, qualit When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + Parameters ---------- code : Flag @@ -144,7 +148,7 @@ def get_flag(self, code: Flag, width: float = None, height: float = None, qualit height : float Image height. Pass an integer between 0 to 2000. Defaults to 100. quality : float - Image quality. Pass an integer between 0 to 100. Defaults to 100. + Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. Returns ------- @@ -179,6 +183,7 @@ def get_image(self, url: str, width: float = None, height: float = None) -> byte This endpoint does not follow HTTP redirects. + Parameters ---------- url : str @@ -221,6 +226,7 @@ def get_initials(self, name: str = None, width: float = None, height: float = No When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + Parameters ---------- name : str @@ -259,6 +265,7 @@ def get_qr(self, text: str, size: float = None, margin: float = None, download: 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 ---------- text : str diff --git a/appwrite/services/databases.py b/appwrite/services/databases.py index 0335087..40b7372 100644 --- a/appwrite/services/databases.py +++ b/appwrite/services/databases.py @@ -14,6 +14,7 @@ def list(self, queries: List[str] = None, search: str = None) -> Dict[str, Any]: """ Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. + Parameters ---------- queries : List[str] @@ -46,6 +47,7 @@ def create(self, database_id: str, name: str, enabled: bool = None) -> Dict[str, Create a new Database. + Parameters ---------- database_id : str @@ -87,6 +89,7 @@ def get(self, database_id: str) -> Dict[str, Any]: """ Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. + Parameters ---------- database_id : str @@ -118,6 +121,7 @@ def update(self, database_id: str, name: str, enabled: bool = None) -> Dict[str, """ Update a database by its unique ID. + Parameters ---------- database_id : str @@ -159,6 +163,7 @@ def delete(self, database_id: str) -> Dict[str, Any]: """ Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database. + Parameters ---------- database_id : str @@ -191,6 +196,7 @@ def list_collections(self, database_id: str, queries: List[str] = None, search: """ Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results. + Parameters ---------- database_id : str @@ -228,6 +234,7 @@ def create_collection(self, database_id: str, collection_id: str, name: str, per """ Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + Parameters ---------- database_id : str @@ -281,6 +288,7 @@ def get_collection(self, database_id: str, collection_id: str) -> Dict[str, Any] """ Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. + Parameters ---------- database_id : str @@ -318,6 +326,7 @@ def update_collection(self, database_id: str, collection_id: str, name: str, per """ Update a collection by its unique ID. + Parameters ---------- database_id : str @@ -371,6 +380,7 @@ def delete_collection(self, database_id: str, collection_id: str) -> Dict[str, A """ Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. + Parameters ---------- database_id : str @@ -409,6 +419,7 @@ def list_attributes(self, database_id: str, collection_id: str, queries: List[st """ List attributes in the collection. + Parameters ---------- database_id : str @@ -450,6 +461,7 @@ def create_boolean_attribute(self, database_id: str, collection_id: str, key: st Create a boolean attribute. + Parameters ---------- database_id : str @@ -506,6 +518,7 @@ def update_boolean_attribute(self, database_id: str, collection_id: str, key: st """ Update a boolean attribute. Changing the `default` value will not update already existing documents. + Parameters ---------- database_id : str @@ -562,6 +575,7 @@ def create_datetime_attribute(self, database_id: str, collection_id: str, key: s """ Create a date time attribute according to the ISO 8601 standard. + Parameters ---------- database_id : str @@ -618,6 +632,7 @@ def update_datetime_attribute(self, database_id: str, collection_id: str, key: s """ Update a date time attribute. Changing the `default` value will not update already existing documents. + Parameters ---------- database_id : str @@ -675,6 +690,7 @@ def create_email_attribute(self, database_id: str, collection_id: str, key: str, Create an email attribute. + Parameters ---------- database_id : str @@ -732,6 +748,7 @@ def update_email_attribute(self, database_id: str, collection_id: str, key: str, Update an email attribute. Changing the `default` value will not update already existing documents. + Parameters ---------- database_id : str @@ -789,6 +806,7 @@ def create_enum_attribute(self, database_id: str, collection_id: str, key: str, Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. + Parameters ---------- database_id : str @@ -852,6 +870,7 @@ def update_enum_attribute(self, database_id: str, collection_id: str, key: str, Update an enum attribute. Changing the `default` value will not update already existing documents. + Parameters ---------- database_id : str @@ -915,6 +934,7 @@ def create_float_attribute(self, database_id: str, collection_id: str, key: str, Create a float attribute. Optionally, minimum and maximum values can be provided. + Parameters ---------- database_id : str @@ -978,6 +998,7 @@ def update_float_attribute(self, database_id: str, collection_id: str, key: str, Update a float attribute. Changing the `default` value will not update already existing documents. + Parameters ---------- database_id : str @@ -1041,6 +1062,7 @@ def create_integer_attribute(self, database_id: str, collection_id: str, key: st Create an integer attribute. Optionally, minimum and maximum values can be provided. + Parameters ---------- database_id : str @@ -1104,6 +1126,7 @@ def update_integer_attribute(self, database_id: str, collection_id: str, key: st Update an integer attribute. Changing the `default` value will not update already existing documents. + Parameters ---------- database_id : str @@ -1167,6 +1190,7 @@ def create_ip_attribute(self, database_id: str, collection_id: str, key: str, re Create IP address attribute. + Parameters ---------- database_id : str @@ -1224,6 +1248,7 @@ def update_ip_attribute(self, database_id: str, collection_id: str, key: str, re Update an ip attribute. Changing the `default` value will not update already existing documents. + Parameters ---------- database_id : str @@ -1281,6 +1306,7 @@ def create_relationship_attribute(self, database_id: str, collection_id: str, re Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). + Parameters ---------- database_id : str @@ -1344,6 +1370,7 @@ def create_string_attribute(self, database_id: str, collection_id: str, key: str Create a string attribute. + Parameters ---------- database_id : str @@ -1410,6 +1437,7 @@ def update_string_attribute(self, database_id: str, collection_id: str, key: str Update a string attribute. Changing the `default` value will not update already existing documents. + Parameters ---------- database_id : str @@ -1470,6 +1498,7 @@ def create_url_attribute(self, database_id: str, collection_id: str, key: str, r Create a URL attribute. + Parameters ---------- database_id : str @@ -1527,6 +1556,7 @@ def update_url_attribute(self, database_id: str, collection_id: str, key: str, r Update an url attribute. Changing the `default` value will not update already existing documents. + Parameters ---------- database_id : str @@ -1583,6 +1613,7 @@ def get_attribute(self, database_id: str, collection_id: str, key: str) -> Dict[ """ Get attribute by ID. + Parameters ---------- database_id : str @@ -1626,6 +1657,7 @@ def delete_attribute(self, database_id: str, collection_id: str, key: str) -> Di """ Deletes an attribute. + Parameters ---------- database_id : str @@ -1671,6 +1703,7 @@ def update_relationship_attribute(self, database_id: str, collection_id: str, ke Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). + Parameters ---------- database_id : str @@ -1721,6 +1754,7 @@ def list_documents(self, database_id: str, collection_id: str, queries: List[str """ Get a list of all the user's documents in a given collection. You can use the query params to filter your results. + Parameters ---------- database_id : str @@ -1760,7 +1794,7 @@ def list_documents(self, database_id: str, collection_id: str, queries: List[str def create_document(self, database_id: str, collection_id: str, document_id: str, data: dict, permissions: List[str] = None) -> Dict[str, Any]: """ Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. - + Parameters ---------- @@ -1811,10 +1845,197 @@ def create_document(self, database_id: str, collection_id: str, document_id: str 'content-type': 'application/json', }, api_params) + def create_documents(self, database_id: str, collection_id: str, documents: List[dict]) -> Dict[str, Any]: + """ + **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. + + Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + + + Parameters + ---------- + database_id : str + Database ID. + collection_id : str + Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. + documents : List[dict] + Array of documents data as JSON objects. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/databases/{databaseId}/collections/{collectionId}/documents' + api_params = {} + if database_id is None: + raise AppwriteException('Missing required parameter: "database_id"') + + if collection_id is None: + raise AppwriteException('Missing required parameter: "collection_id"') + + if documents is None: + raise AppwriteException('Missing required parameter: "documents"') + + api_path = api_path.replace('{databaseId}', database_id) + api_path = api_path.replace('{collectionId}', collection_id) + + api_params['documents'] = documents + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def upsert_documents(self, database_id: str, collection_id: str, documents: List[dict]) -> Dict[str, Any]: + """ + **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. + + Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + + + + Parameters + ---------- + database_id : str + Database ID. + collection_id : str + Collection ID. + documents : List[dict] + Array of document data as JSON objects. May contain partial documents. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/databases/{databaseId}/collections/{collectionId}/documents' + api_params = {} + if database_id is None: + raise AppwriteException('Missing required parameter: "database_id"') + + if collection_id is None: + raise AppwriteException('Missing required parameter: "collection_id"') + + if documents is None: + raise AppwriteException('Missing required parameter: "documents"') + + api_path = api_path.replace('{databaseId}', database_id) + api_path = api_path.replace('{collectionId}', collection_id) + + api_params['documents'] = documents + + return self.client.call('put', api_path, { + 'content-type': 'application/json', + }, api_params) + + def update_documents(self, database_id: str, collection_id: str, data: dict = None, queries: List[str] = None) -> Dict[str, Any]: + """ + **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. + + Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. + + + Parameters + ---------- + database_id : str + Database ID. + collection_id : str + Collection ID. + data : dict + Document data as JSON object. Include only attribute and value pairs to be updated. + queries : List[str] + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/databases/{databaseId}/collections/{collectionId}/documents' + api_params = {} + if database_id is None: + raise AppwriteException('Missing required parameter: "database_id"') + + if collection_id is None: + raise AppwriteException('Missing required parameter: "collection_id"') + + api_path = api_path.replace('{databaseId}', database_id) + api_path = api_path.replace('{collectionId}', collection_id) + + api_params['data'] = data + api_params['queries'] = queries + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) + + def delete_documents(self, database_id: str, collection_id: str, queries: List[str] = None) -> Dict[str, Any]: + """ + **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. + + Bulk delete documents using queries, if no queries are passed then all documents are deleted. + + + Parameters + ---------- + database_id : str + Database ID. + collection_id : str + Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + queries : List[str] + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/databases/{databaseId}/collections/{collectionId}/documents' + api_params = {} + if database_id is None: + raise AppwriteException('Missing required parameter: "database_id"') + + if collection_id is None: + raise AppwriteException('Missing required parameter: "collection_id"') + + api_path = api_path.replace('{databaseId}', database_id) + api_path = api_path.replace('{collectionId}', collection_id) + + api_params['queries'] = queries + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) + def get_document(self, database_id: str, collection_id: str, document_id: str, queries: List[str] = None) -> Dict[str, Any]: """ Get a document by its unique ID. This endpoint response returns a JSON object with the document data. + Parameters ---------- database_id : str @@ -1857,10 +2078,67 @@ def get_document(self, database_id: str, collection_id: str, document_id: str, q return self.client.call('get', api_path, { }, api_params) + def upsert_document(self, database_id: str, collection_id: str, document_id: str, data: dict, permissions: List[str] = None) -> Dict[str, Any]: + """ + **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. + + Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + + + Parameters + ---------- + database_id : str + Database ID. + collection_id : str + Collection ID. + document_id : str + Document ID. + data : dict + Document data as JSON object. Include all required attributes of the document to be created or updated. + permissions : List[str] + An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}' + api_params = {} + if database_id is None: + raise AppwriteException('Missing required parameter: "database_id"') + + if collection_id is None: + raise AppwriteException('Missing required parameter: "collection_id"') + + if document_id is None: + raise AppwriteException('Missing required parameter: "document_id"') + + if data is None: + raise AppwriteException('Missing required parameter: "data"') + + api_path = api_path.replace('{databaseId}', database_id) + api_path = api_path.replace('{collectionId}', collection_id) + api_path = api_path.replace('{documentId}', document_id) + + api_params['data'] = data + api_params['permissions'] = permissions + + return self.client.call('put', api_path, { + 'content-type': 'application/json', + }, api_params) + def update_document(self, database_id: str, collection_id: str, document_id: str, data: dict = None, permissions: List[str] = None) -> Dict[str, Any]: """ Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. + Parameters ---------- database_id : str @@ -1911,6 +2189,7 @@ def delete_document(self, database_id: str, collection_id: str, document_id: str """ Delete a document by its unique ID. + Parameters ---------- database_id : str @@ -1951,10 +2230,125 @@ def delete_document(self, database_id: str, collection_id: str, document_id: str 'content-type': 'application/json', }, api_params) + def decrement_document_attribute(self, database_id: str, collection_id: str, document_id: str, attribute: str, value: float = None, min: float = None) -> Dict[str, Any]: + """ + Decrement a specific attribute of a document by a given value. + + + Parameters + ---------- + database_id : str + Database ID. + collection_id : str + Collection ID. + document_id : str + Document ID. + attribute : str + Attribute key. + value : float + Value to decrement the attribute by. The value must be a number. + min : float + Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement' + api_params = {} + if database_id is None: + raise AppwriteException('Missing required parameter: "database_id"') + + if collection_id is None: + raise AppwriteException('Missing required parameter: "collection_id"') + + if document_id is None: + raise AppwriteException('Missing required parameter: "document_id"') + + if attribute is None: + raise AppwriteException('Missing required parameter: "attribute"') + + api_path = api_path.replace('{databaseId}', database_id) + api_path = api_path.replace('{collectionId}', collection_id) + api_path = api_path.replace('{documentId}', document_id) + api_path = api_path.replace('{attribute}', attribute) + + api_params['value'] = value + api_params['min'] = min + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) + + def increment_document_attribute(self, database_id: str, collection_id: str, document_id: str, attribute: str, value: float = None, max: float = None) -> Dict[str, Any]: + """ + Increment a specific attribute of a document by a given value. + + + Parameters + ---------- + database_id : str + Database ID. + collection_id : str + Collection ID. + document_id : str + Document ID. + attribute : str + Attribute key. + value : float + Value to increment the attribute by. The value must be a number. + max : float + Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment' + api_params = {} + if database_id is None: + raise AppwriteException('Missing required parameter: "database_id"') + + if collection_id is None: + raise AppwriteException('Missing required parameter: "collection_id"') + + if document_id is None: + raise AppwriteException('Missing required parameter: "document_id"') + + if attribute is None: + raise AppwriteException('Missing required parameter: "attribute"') + + api_path = api_path.replace('{databaseId}', database_id) + api_path = api_path.replace('{collectionId}', collection_id) + api_path = api_path.replace('{documentId}', document_id) + api_path = api_path.replace('{attribute}', attribute) + + api_params['value'] = value + api_params['max'] = max + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) + def list_indexes(self, database_id: str, collection_id: str, queries: List[str] = None) -> Dict[str, Any]: """ List indexes in the collection. + Parameters ---------- database_id : str @@ -1991,11 +2385,12 @@ def list_indexes(self, database_id: str, collection_id: str, queries: List[str] return self.client.call('get', api_path, { }, api_params) - def create_index(self, database_id: str, collection_id: str, key: str, type: IndexType, attributes: List[str], orders: List[str] = None) -> Dict[str, Any]: + def create_index(self, database_id: str, collection_id: str, key: str, type: IndexType, attributes: List[str], orders: List[str] = None, lengths: List[float] = None) -> Dict[str, Any]: """ Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be `key`, `fulltext`, and `unique`. + Parameters ---------- database_id : str @@ -2010,6 +2405,8 @@ def create_index(self, database_id: str, collection_id: str, key: str, type: Ind Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. orders : List[str] Array of index orders. Maximum of 100 orders are allowed. + lengths : List[float] + Length of index. Maximum of 100 Returns ------- @@ -2046,6 +2443,7 @@ def create_index(self, database_id: str, collection_id: str, key: str, type: Ind api_params['type'] = type api_params['attributes'] = attributes api_params['orders'] = orders + api_params['lengths'] = lengths return self.client.call('post', api_path, { 'content-type': 'application/json', @@ -2055,6 +2453,7 @@ def get_index(self, database_id: str, collection_id: str, key: str) -> Dict[str, """ Get index by ID. + Parameters ---------- database_id : str @@ -2098,6 +2497,7 @@ def delete_index(self, database_id: str, collection_id: str, key: str) -> Dict[s """ Delete an index. + Parameters ---------- database_id : str diff --git a/appwrite/services/functions.py b/appwrite/services/functions.py index a483a22..3dd2459 100644 --- a/appwrite/services/functions.py +++ b/appwrite/services/functions.py @@ -3,6 +3,8 @@ from ..exception import AppwriteException from ..enums.runtime import Runtime; from ..input_file import InputFile +from ..enums.vcs_deployment_type import VCSDeploymentType; +from ..enums.deployment_download_type import DeploymentDownloadType; from ..enums.execution_method import ExecutionMethod; class Functions(Service): @@ -14,10 +16,11 @@ def list(self, queries: List[str] = None, search: str = None) -> Dict[str, Any]: """ Get a list of all the project's functions. You can use the query params to filter your results. + Parameters ---------- queries : List[str] - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId search : str Search term to filter your list results. Max length: 256 chars. @@ -41,10 +44,11 @@ def list(self, queries: List[str] = None, search: str = None) -> Dict[str, Any]: return self.client.call('get', api_path, { }, api_params) - def create(self, function_id: str, name: str, runtime: Runtime, execute: List[str] = None, events: List[str] = None, schedule: str = None, timeout: float = None, enabled: bool = None, logging: bool = None, entrypoint: str = None, commands: str = None, scopes: List[str] = None, installation_id: str = None, provider_repository_id: str = None, provider_branch: str = None, provider_silent_mode: bool = None, provider_root_directory: str = None, template_repository: str = None, template_owner: str = None, template_root_directory: str = None, template_version: str = None, specification: str = None) -> Dict[str, Any]: + def create(self, function_id: str, name: str, runtime: Runtime, execute: List[str] = None, events: List[str] = None, schedule: str = None, timeout: float = None, enabled: bool = None, logging: bool = None, entrypoint: str = None, commands: str = None, scopes: List[str] = None, installation_id: str = None, provider_repository_id: str = None, provider_branch: str = None, provider_silent_mode: bool = None, provider_root_directory: str = None, specification: str = None) -> Dict[str, Any]: """ Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API. + Parameters ---------- function_id : str @@ -64,7 +68,7 @@ def create(self, function_id: str, name: str, runtime: Runtime, execute: List[st enabled : bool Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled. logging : bool - Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project. + When disabled, executions will exclude logs and errors, and will be slightly faster. entrypoint : str Entrypoint File. This path is relative to the "providerRootDirectory". commands : str @@ -81,14 +85,6 @@ def create(self, function_id: str, name: str, runtime: Runtime, execute: List[st Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests. provider_root_directory : str Path to function code in the linked repo. - template_repository : str - Repository name of the template. - template_owner : str - The name of the owner of the template. - template_root_directory : str - Path to function code in the template repo. - template_version : str - Version (tag) for the repo linked to the function template. specification : str Runtime specification for the function and builds. @@ -132,10 +128,6 @@ def create(self, function_id: str, name: str, runtime: Runtime, execute: List[st api_params['providerBranch'] = provider_branch api_params['providerSilentMode'] = provider_silent_mode api_params['providerRootDirectory'] = provider_root_directory - api_params['templateRepository'] = template_repository - api_params['templateOwner'] = template_owner - api_params['templateRootDirectory'] = template_root_directory - api_params['templateVersion'] = template_version api_params['specification'] = specification return self.client.call('post', api_path, { @@ -166,7 +158,6 @@ def list_runtimes(self) -> Dict[str, Any]: def list_specifications(self) -> Dict[str, Any]: """ List allowed function specifications for this instance. - Returns ------- @@ -189,6 +180,7 @@ def get(self, function_id: str) -> Dict[str, Any]: """ Get a function by its unique ID. + Parameters ---------- function_id : str @@ -220,6 +212,7 @@ def update(self, function_id: str, name: str, runtime: Runtime = None, execute: """ Update function by its unique ID. + Parameters ---------- function_id : str @@ -239,7 +232,7 @@ def update(self, function_id: str, name: str, runtime: Runtime = None, execute: enabled : bool Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled. logging : bool - Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project. + When disabled, executions will exclude logs and errors, and will be slightly faster. entrypoint : str Entrypoint File. This path is relative to the "providerRootDirectory". commands : str @@ -306,6 +299,7 @@ def delete(self, function_id: str) -> Dict[str, Any]: """ Delete a function by its unique ID. + Parameters ---------- function_id : str @@ -334,16 +328,56 @@ def delete(self, function_id: str) -> Dict[str, Any]: 'content-type': 'application/json', }, api_params) + def update_function_deployment(self, function_id: str, deployment_id: str) -> Dict[str, Any]: + """ + Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function. + + + Parameters + ---------- + function_id : str + Function ID. + deployment_id : str + Deployment ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/functions/{functionId}/deployment' + api_params = {} + if function_id is None: + raise AppwriteException('Missing required parameter: "function_id"') + + if deployment_id is None: + raise AppwriteException('Missing required parameter: "deployment_id"') + + api_path = api_path.replace('{functionId}', function_id) + + api_params['deploymentId'] = deployment_id + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) + def list_deployments(self, function_id: str, queries: List[str] = None, search: str = None) -> Dict[str, Any]: """ - Get a list of all the project's code deployments. You can use the query params to filter your results. + Get a list of all the function's code deployments. You can use the query params to filter your results. + Parameters ---------- function_id : str Function ID. queries : List[str] - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type search : str Search term to filter your list results. Max length: 256 chars. @@ -379,6 +413,7 @@ def create_deployment(self, function_id: str, code: InputFile, activate: bool, e Use the "command" param to set the entrypoint used to execute your code. + Parameters ---------- function_id : str @@ -432,9 +467,10 @@ def create_deployment(self, function_id: str, code: InputFile, activate: bool, e 'content-type': 'multipart/form-data', }, api_params, param_name, on_progress, upload_id) - def get_deployment(self, function_id: str, deployment_id: str) -> Dict[str, Any]: + def create_duplicate_deployment(self, function_id: str, deployment_id: str, build_id: str = None) -> Dict[str, Any]: """ - Get a code deployment by its unique ID. + Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. + Parameters ---------- @@ -442,6 +478,8 @@ def get_deployment(self, function_id: str, deployment_id: str) -> Dict[str, Any] Function ID. deployment_id : str Deployment ID. + build_id : str + Build unique ID. Returns ------- @@ -454,7 +492,7 @@ def get_deployment(self, function_id: str, deployment_id: str) -> Dict[str, Any] If API request fails """ - api_path = '/functions/{functionId}/deployments/{deploymentId}' + api_path = '/functions/{functionId}/deployments/duplicate' api_params = {} if function_id is None: raise AppwriteException('Missing required parameter: "function_id"') @@ -463,22 +501,35 @@ def get_deployment(self, function_id: str, deployment_id: str) -> Dict[str, Any] raise AppwriteException('Missing required parameter: "deployment_id"') api_path = api_path.replace('{functionId}', function_id) - api_path = api_path.replace('{deploymentId}', deployment_id) + api_params['deploymentId'] = deployment_id + api_params['buildId'] = build_id - return self.client.call('get', api_path, { + return self.client.call('post', api_path, { + 'content-type': 'application/json', }, api_params) - def update_deployment(self, function_id: str, deployment_id: str) -> Dict[str, Any]: + def create_template_deployment(self, function_id: str, repository: str, owner: str, root_directory: str, version: str, activate: bool = None) -> Dict[str, Any]: """ - Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint. + Create a deployment based on a template. + + Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details. + Parameters ---------- function_id : str Function ID. - deployment_id : str - Deployment ID. + repository : str + Repository name of the template. + owner : str + The name of the owner of the template. + root_directory : str + Path to function code in the template repo. + version : str + Version (tag) for the repo linked to the function template. + activate : bool + Automatically activate the deployment when it is finished building. Returns ------- @@ -491,32 +542,52 @@ def update_deployment(self, function_id: str, deployment_id: str) -> Dict[str, A If API request fails """ - api_path = '/functions/{functionId}/deployments/{deploymentId}' + api_path = '/functions/{functionId}/deployments/template' api_params = {} if function_id is None: raise AppwriteException('Missing required parameter: "function_id"') - if deployment_id is None: - raise AppwriteException('Missing required parameter: "deployment_id"') + if repository is None: + raise AppwriteException('Missing required parameter: "repository"') + + if owner is None: + raise AppwriteException('Missing required parameter: "owner"') + + if root_directory is None: + raise AppwriteException('Missing required parameter: "root_directory"') + + if version is None: + raise AppwriteException('Missing required parameter: "version"') api_path = api_path.replace('{functionId}', function_id) - api_path = api_path.replace('{deploymentId}', deployment_id) + api_params['repository'] = repository + api_params['owner'] = owner + api_params['rootDirectory'] = root_directory + api_params['version'] = version + api_params['activate'] = activate - return self.client.call('patch', api_path, { + return self.client.call('post', api_path, { 'content-type': 'application/json', }, api_params) - def delete_deployment(self, function_id: str, deployment_id: str) -> Dict[str, Any]: + def create_vcs_deployment(self, function_id: str, type: VCSDeploymentType, reference: str, activate: bool = None) -> Dict[str, Any]: """ - Delete a code deployment by its unique ID. + Create a deployment when a function is connected to VCS. + + This endpoint lets you create deployment from a branch, commit, or a tag. + Parameters ---------- function_id : str Function ID. - deployment_id : str - Deployment ID. + type : VCSDeploymentType + Type of reference passed. Allowed values are: branch, commit + reference : str + VCS reference to create deployment from. Depending on type this can be: branch name, commit hash + activate : bool + Automatically activate the deployment when it is finished building. Returns ------- @@ -529,25 +600,31 @@ def delete_deployment(self, function_id: str, deployment_id: str) -> Dict[str, A If API request fails """ - api_path = '/functions/{functionId}/deployments/{deploymentId}' + api_path = '/functions/{functionId}/deployments/vcs' api_params = {} if function_id is None: raise AppwriteException('Missing required parameter: "function_id"') - if deployment_id is None: - raise AppwriteException('Missing required parameter: "deployment_id"') + if type is None: + raise AppwriteException('Missing required parameter: "type"') + + if reference is None: + raise AppwriteException('Missing required parameter: "reference"') api_path = api_path.replace('{functionId}', function_id) - api_path = api_path.replace('{deploymentId}', deployment_id) + api_params['type'] = type + api_params['reference'] = reference + api_params['activate'] = activate - return self.client.call('delete', api_path, { + return self.client.call('post', api_path, { 'content-type': 'application/json', }, api_params) - def create_build(self, function_id: str, deployment_id: str, build_id: str = None) -> Dict[str, Any]: + def get_deployment(self, function_id: str, deployment_id: str) -> Dict[str, Any]: """ - Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. + Get a function deployment by its unique ID. + Parameters ---------- @@ -555,8 +632,6 @@ def create_build(self, function_id: str, deployment_id: str, build_id: str = Non Function ID. deployment_id : str Deployment ID. - build_id : str - Build unique ID. Returns ------- @@ -569,7 +644,7 @@ def create_build(self, function_id: str, deployment_id: str, build_id: str = Non If API request fails """ - api_path = '/functions/{functionId}/deployments/{deploymentId}/build' + api_path = '/functions/{functionId}/deployments/{deploymentId}' api_params = {} if function_id is None: raise AppwriteException('Missing required parameter: "function_id"') @@ -580,15 +655,14 @@ def create_build(self, function_id: str, deployment_id: str, build_id: str = Non api_path = api_path.replace('{functionId}', function_id) api_path = api_path.replace('{deploymentId}', deployment_id) - api_params['buildId'] = build_id - return self.client.call('post', api_path, { - 'content-type': 'application/json', + return self.client.call('get', api_path, { }, api_params) - def update_deployment_build(self, function_id: str, deployment_id: str) -> Dict[str, Any]: + def delete_deployment(self, function_id: str, deployment_id: str) -> Dict[str, Any]: """ - Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. + Delete a code deployment by its unique ID. + Parameters ---------- @@ -608,7 +682,7 @@ def update_deployment_build(self, function_id: str, deployment_id: str) -> Dict[ If API request fails """ - api_path = '/functions/{functionId}/deployments/{deploymentId}/build' + api_path = '/functions/{functionId}/deployments/{deploymentId}' api_params = {} if function_id is None: raise AppwriteException('Missing required parameter: "function_id"') @@ -620,13 +694,14 @@ def update_deployment_build(self, function_id: str, deployment_id: str) -> Dict[ api_path = api_path.replace('{deploymentId}', deployment_id) - return self.client.call('patch', api_path, { + return self.client.call('delete', api_path, { 'content-type': 'application/json', }, api_params) - def get_deployment_download(self, function_id: str, deployment_id: str) -> bytes: + def get_deployment_download(self, function_id: str, deployment_id: str, type: DeploymentDownloadType = None) -> bytes: """ - Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download. + Get a function deployment 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 ---------- @@ -634,6 +709,8 @@ def get_deployment_download(self, function_id: str, deployment_id: str) -> bytes Function ID. deployment_id : str Deployment ID. + type : DeploymentDownloadType + Deployment file to download. Can be: "source", "output". Returns ------- @@ -657,22 +734,61 @@ def get_deployment_download(self, function_id: str, deployment_id: str) -> bytes api_path = api_path.replace('{functionId}', function_id) api_path = api_path.replace('{deploymentId}', deployment_id) + api_params['type'] = type return self.client.call('get', api_path, { }, api_params) - def list_executions(self, function_id: str, queries: List[str] = None, search: str = None) -> Dict[str, Any]: + def update_deployment_status(self, function_id: str, deployment_id: str) -> Dict[str, Any]: + """ + Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. + + + Parameters + ---------- + function_id : str + Function ID. + deployment_id : str + Deployment ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/functions/{functionId}/deployments/{deploymentId}/status' + api_params = {} + if function_id is None: + raise AppwriteException('Missing required parameter: "function_id"') + + if deployment_id is None: + raise AppwriteException('Missing required parameter: "deployment_id"') + + api_path = api_path.replace('{functionId}', function_id) + api_path = api_path.replace('{deploymentId}', deployment_id) + + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) + + def list_executions(self, function_id: str, queries: List[str] = None) -> Dict[str, Any]: """ Get a list of all the current user function execution logs. You can use the query params to filter your results. + Parameters ---------- function_id : str Function ID. queries : List[str] Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId - search : str - Search term to filter your list results. Max length: 256 chars. Returns ------- @@ -693,7 +809,6 @@ def list_executions(self, function_id: str, queries: List[str] = None, search: s api_path = api_path.replace('{functionId}', function_id) api_params['queries'] = queries - api_params['search'] = search return self.client.call('get', api_path, { }, api_params) @@ -702,6 +817,7 @@ def create_execution(self, function_id: str, body: str = None, xasync: bool = No """ Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously. + Parameters ---------- function_id : str @@ -752,6 +868,7 @@ def get_execution(self, function_id: str, execution_id: str) -> Dict[str, Any]: """ Get a function execution log by its unique ID. + Parameters ---------- function_id : str @@ -788,7 +905,7 @@ def get_execution(self, function_id: str, execution_id: str) -> Dict[str, Any]: def delete_execution(self, function_id: str, execution_id: str) -> Dict[str, Any]: """ Delete a function execution by its unique ID. - + Parameters ---------- @@ -828,6 +945,7 @@ def list_variables(self, function_id: str) -> Dict[str, Any]: """ Get a list of all variables of a specific function. + Parameters ---------- function_id : str @@ -855,10 +973,11 @@ def list_variables(self, function_id: str) -> Dict[str, Any]: return self.client.call('get', api_path, { }, api_params) - def create_variable(self, function_id: str, key: str, value: str) -> Dict[str, Any]: + def create_variable(self, function_id: str, key: str, value: str, secret: bool = None) -> Dict[str, Any]: """ Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables. + Parameters ---------- function_id : str @@ -867,6 +986,8 @@ def create_variable(self, function_id: str, key: str, value: str) -> Dict[str, A Variable key. Max length: 255 chars. value : str Variable value. Max length: 8192 chars. + secret : bool + Secret variables can be updated or deleted, but only functions can read them during build and runtime. Returns ------- @@ -894,6 +1015,7 @@ def create_variable(self, function_id: str, key: str, value: str) -> Dict[str, A api_params['key'] = key api_params['value'] = value + api_params['secret'] = secret return self.client.call('post', api_path, { 'content-type': 'application/json', @@ -903,6 +1025,7 @@ def get_variable(self, function_id: str, variable_id: str) -> Dict[str, Any]: """ Get a variable by its unique ID. + Parameters ---------- function_id : str @@ -936,10 +1059,11 @@ def get_variable(self, function_id: str, variable_id: str) -> Dict[str, Any]: return self.client.call('get', api_path, { }, api_params) - def update_variable(self, function_id: str, variable_id: str, key: str, value: str = None) -> Dict[str, Any]: + def update_variable(self, function_id: str, variable_id: str, key: str, value: str = None, secret: bool = None) -> Dict[str, Any]: """ Update variable by its unique ID. + Parameters ---------- function_id : str @@ -950,6 +1074,8 @@ def update_variable(self, function_id: str, variable_id: str, key: str, value: s Variable key. Max length: 255 chars. value : str Variable value. Max length: 8192 chars. + secret : bool + Secret variables can be updated or deleted, but only functions can read them during build and runtime. Returns ------- @@ -978,6 +1104,7 @@ def update_variable(self, function_id: str, variable_id: str, key: str, value: s api_params['key'] = key api_params['value'] = value + api_params['secret'] = secret return self.client.call('put', api_path, { 'content-type': 'application/json', @@ -987,6 +1114,7 @@ def delete_variable(self, function_id: str, variable_id: str) -> Dict[str, Any]: """ Delete a variable by its unique ID. + Parameters ---------- function_id : str diff --git a/appwrite/services/graphql.py b/appwrite/services/graphql.py index 22ca3aa..69ad4e0 100644 --- a/appwrite/services/graphql.py +++ b/appwrite/services/graphql.py @@ -11,6 +11,7 @@ def query(self, query: dict) -> Dict[str, Any]: """ Execute a GraphQL mutation. + Parameters ---------- query : dict @@ -44,6 +45,7 @@ def mutation(self, query: dict) -> Dict[str, Any]: """ Execute a GraphQL mutation. + Parameters ---------- query : dict diff --git a/appwrite/services/health.py b/appwrite/services/health.py index dd1d183..665fd1e 100644 --- a/appwrite/services/health.py +++ b/appwrite/services/health.py @@ -75,6 +75,7 @@ def get_certificate(self, domain: str = None) -> Dict[str, Any]: """ Get the SSL certificate for a domain + Parameters ---------- domain : str @@ -145,6 +146,7 @@ def get_queue_builds(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of builds that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- threshold : float @@ -173,6 +175,7 @@ def get_queue_certificates(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. + Parameters ---------- threshold : float @@ -201,6 +204,7 @@ def get_queue_databases(self, name: str = None, threshold: float = None) -> Dict """ Get the number of database changes that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- name : str @@ -232,6 +236,7 @@ def get_queue_deletes(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- threshold : float @@ -261,6 +266,7 @@ def get_failed_jobs(self, name: Name, threshold: float = None) -> Dict[str, Any] Returns the amount of failed jobs in a given queue. + Parameters ---------- name : Name @@ -295,6 +301,7 @@ def get_queue_functions(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of function executions that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- threshold : float @@ -323,6 +330,7 @@ def get_queue_logs(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of logs that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- threshold : float @@ -351,6 +359,7 @@ def get_queue_mails(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of mails that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- threshold : float @@ -379,6 +388,7 @@ def get_queue_messaging(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of messages that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- threshold : float @@ -407,6 +417,7 @@ def get_queue_migrations(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of migrations that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- threshold : float @@ -435,6 +446,7 @@ def get_queue_stats_resources(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue. + Parameters ---------- threshold : float @@ -463,6 +475,7 @@ def get_queue_usage(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of metrics that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- threshold : float @@ -491,6 +504,7 @@ def get_queue_webhooks(self, threshold: float = None) -> Dict[str, Any]: """ Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server. + Parameters ---------- threshold : float diff --git a/appwrite/services/messaging.py b/appwrite/services/messaging.py index 639a820..153a1f7 100644 --- a/appwrite/services/messaging.py +++ b/appwrite/services/messaging.py @@ -13,6 +13,7 @@ def list_messages(self, queries: List[str] = None, search: str = None) -> Dict[s """ Get a list of all messages from the current Appwrite project. + Parameters ---------- queries : List[str] @@ -44,6 +45,7 @@ def create_email(self, message_id: str, subject: str, content: str, topics: List """ Create a new email message. + Parameters ---------- message_id : str @@ -116,6 +118,7 @@ def update_email(self, message_id: str, topics: List[str] = None, users: List[st Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. + Parameters ---------- message_id : str @@ -181,6 +184,7 @@ def create_push(self, message_id: str, title: str = None, body: str = None, topi """ Create a new push notification. + Parameters ---------- message_id : str @@ -268,6 +272,7 @@ def update_push(self, message_id: str, topics: List[str] = None, users: List[str Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. + Parameters ---------- message_id : str @@ -354,6 +359,7 @@ def create_sms(self, message_id: str, content: str, topics: List[str] = None, us """ Create a new SMS message. + Parameters ---------- message_id : str @@ -408,6 +414,7 @@ def update_sms(self, message_id: str, topics: List[str] = None, users: List[str] Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. + Parameters ---------- message_id : str @@ -459,6 +466,7 @@ def get_message(self, message_id: str) -> Dict[str, Any]: Get a message by its unique ID. + Parameters ---------- message_id : str @@ -490,6 +498,7 @@ def delete(self, message_id: str) -> Dict[str, Any]: """ Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message. + Parameters ---------- message_id : str @@ -522,6 +531,7 @@ def list_message_logs(self, message_id: str, queries: List[str] = None) -> Dict[ """ Get the message activity logs listed by its unique ID. + Parameters ---------- message_id : str @@ -556,6 +566,7 @@ def list_targets(self, message_id: str, queries: List[str] = None) -> Dict[str, """ Get a list of the targets associated with a message. + Parameters ---------- message_id : str @@ -590,6 +601,7 @@ def list_providers(self, queries: List[str] = None, search: str = None) -> Dict[ """ Get a list of all providers from the current Appwrite project. + Parameters ---------- queries : List[str] @@ -621,6 +633,7 @@ def create_apns_provider(self, provider_id: str, name: str, auth_key: str = None """ Create a new Apple Push Notification service provider. + Parameters ---------- provider_id : str @@ -677,6 +690,7 @@ def update_apns_provider(self, provider_id: str, name: str = None, enabled: bool """ Update a Apple Push Notification service provider by its unique ID. + Parameters ---------- provider_id : str @@ -730,6 +744,7 @@ def create_fcm_provider(self, provider_id: str, name: str, service_account_json: """ Create a new Firebase Cloud Messaging provider. + Parameters ---------- provider_id : str @@ -774,6 +789,7 @@ def update_fcm_provider(self, provider_id: str, name: str = None, enabled: bool """ Update a Firebase Cloud Messaging provider by its unique ID. + Parameters ---------- provider_id : str @@ -815,6 +831,7 @@ def create_mailgun_provider(self, provider_id: str, name: str, api_key: str = No """ Create a new Mailgun provider. + Parameters ---------- provider_id : str @@ -877,6 +894,7 @@ def update_mailgun_provider(self, provider_id: str, name: str = None, api_key: s """ Update a Mailgun provider by its unique ID. + Parameters ---------- provider_id : str @@ -936,6 +954,7 @@ def create_msg91_provider(self, provider_id: str, name: str, template_id: str = """ Create a new MSG91 provider. + Parameters ---------- provider_id : str @@ -986,6 +1005,7 @@ def update_msg91_provider(self, provider_id: str, name: str = None, enabled: boo """ Update a MSG91 provider by its unique ID. + Parameters ---------- provider_id : str @@ -1033,6 +1053,7 @@ def create_sendgrid_provider(self, provider_id: str, name: str, api_key: str = N """ Create a new Sendgrid provider. + Parameters ---------- provider_id : str @@ -1089,6 +1110,7 @@ def update_sendgrid_provider(self, provider_id: str, name: str = None, enabled: """ Update a Sendgrid provider by its unique ID. + Parameters ---------- provider_id : str @@ -1142,6 +1164,7 @@ def create_smtp_provider(self, provider_id: str, name: str, host: str, port: flo """ Create a new SMTP provider. + Parameters ---------- provider_id : str @@ -1219,6 +1242,7 @@ def update_smtp_provider(self, provider_id: str, name: str = None, host: str = N """ Update a SMTP provider by its unique ID. + Parameters ---------- provider_id : str @@ -1290,6 +1314,7 @@ def create_telesign_provider(self, provider_id: str, name: str, xfrom: str = Non """ Create a new Telesign provider. + Parameters ---------- provider_id : str @@ -1340,6 +1365,7 @@ def update_telesign_provider(self, provider_id: str, name: str = None, enabled: """ Update a Telesign provider by its unique ID. + Parameters ---------- provider_id : str @@ -1387,6 +1413,7 @@ def create_textmagic_provider(self, provider_id: str, name: str, xfrom: str = No """ Create a new Textmagic provider. + Parameters ---------- provider_id : str @@ -1437,6 +1464,7 @@ def update_textmagic_provider(self, provider_id: str, name: str = None, enabled: """ Update a Textmagic provider by its unique ID. + Parameters ---------- provider_id : str @@ -1484,6 +1512,7 @@ def create_twilio_provider(self, provider_id: str, name: str, xfrom: str = None, """ Create a new Twilio provider. + Parameters ---------- provider_id : str @@ -1534,6 +1563,7 @@ def update_twilio_provider(self, provider_id: str, name: str = None, enabled: bo """ Update a Twilio provider by its unique ID. + Parameters ---------- provider_id : str @@ -1581,6 +1611,7 @@ def create_vonage_provider(self, provider_id: str, name: str, xfrom: str = None, """ Create a new Vonage provider. + Parameters ---------- provider_id : str @@ -1631,6 +1662,7 @@ def update_vonage_provider(self, provider_id: str, name: str = None, enabled: bo """ Update a Vonage provider by its unique ID. + Parameters ---------- provider_id : str @@ -1679,6 +1711,7 @@ def get_provider(self, provider_id: str) -> Dict[str, Any]: Get a provider by its unique ID. + Parameters ---------- provider_id : str @@ -1710,6 +1743,7 @@ def delete_provider(self, provider_id: str) -> Dict[str, Any]: """ Delete a provider by its unique ID. + Parameters ---------- provider_id : str @@ -1742,6 +1776,7 @@ def list_provider_logs(self, provider_id: str, queries: List[str] = None) -> Dic """ Get the provider activity logs listed by its unique ID. + Parameters ---------- provider_id : str @@ -1776,6 +1811,7 @@ def list_subscriber_logs(self, subscriber_id: str, queries: List[str] = None) -> """ Get the subscriber activity logs listed by its unique ID. + Parameters ---------- subscriber_id : str @@ -1810,6 +1846,7 @@ def list_topics(self, queries: List[str] = None, search: str = None) -> Dict[str """ Get a list of all topics from the current Appwrite project. + Parameters ---------- queries : List[str] @@ -1841,6 +1878,7 @@ def create_topic(self, topic_id: str, name: str, subscribe: List[str] = None) -> """ Create a new topic. + Parameters ---------- topic_id : str @@ -1883,6 +1921,7 @@ def get_topic(self, topic_id: str) -> Dict[str, Any]: Get a topic by its unique ID. + Parameters ---------- topic_id : str @@ -1915,6 +1954,7 @@ def update_topic(self, topic_id: str, name: str = None, subscribe: List[str] = N Update a topic by its unique ID. + Parameters ---------- topic_id : str @@ -1953,6 +1993,7 @@ def delete_topic(self, topic_id: str) -> Dict[str, Any]: """ Delete a topic by its unique ID. + Parameters ---------- topic_id : str @@ -1985,6 +2026,7 @@ def list_topic_logs(self, topic_id: str, queries: List[str] = None) -> Dict[str, """ Get the topic activity logs listed by its unique ID. + Parameters ---------- topic_id : str @@ -2019,6 +2061,7 @@ def list_subscribers(self, topic_id: str, queries: List[str] = None, search: str """ Get a list of all subscribers from the current Appwrite project. + Parameters ---------- topic_id : str @@ -2056,6 +2099,7 @@ def create_subscriber(self, topic_id: str, subscriber_id: str, target_id: str) - """ Create a new subscriber. + Parameters ---------- topic_id : str @@ -2101,6 +2145,7 @@ def get_subscriber(self, topic_id: str, subscriber_id: str) -> Dict[str, Any]: Get a subscriber by its unique ID. + Parameters ---------- topic_id : str @@ -2138,6 +2183,7 @@ def delete_subscriber(self, topic_id: str, subscriber_id: str) -> Dict[str, Any] """ Delete a subscriber by its unique ID. + Parameters ---------- topic_id : str diff --git a/appwrite/services/sites.py b/appwrite/services/sites.py new file mode 100644 index 0000000..857cabe --- /dev/null +++ b/appwrite/services/sites.py @@ -0,0 +1,1102 @@ +from ..service import Service +from typing import List, Dict, Any +from ..exception import AppwriteException +from ..enums.framework import Framework; +from ..enums.build_runtime import BuildRuntime; +from ..enums.adapter import Adapter; +from ..input_file import InputFile +from ..enums.vcs_deployment_type import VCSDeploymentType; +from ..enums.deployment_download_type import DeploymentDownloadType; + +class Sites(Service): + + def __init__(self, client) -> None: + super(Sites, self).__init__(client) + + def list(self, queries: List[str] = None, search: str = None) -> Dict[str, Any]: + """ + Get a list of all the project's sites. You can use the query params to filter your results. + + + Parameters + ---------- + queries : List[str] + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId + search : str + Search term to filter your list results. Max length: 256 chars. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites' + api_params = {} + + api_params['queries'] = queries + api_params['search'] = search + + return self.client.call('get', api_path, { + }, api_params) + + def create(self, site_id: str, name: str, framework: Framework, build_runtime: BuildRuntime, enabled: bool = None, logging: bool = None, timeout: float = None, install_command: str = None, build_command: str = None, output_directory: str = None, adapter: Adapter = None, installation_id: str = None, fallback_file: str = None, provider_repository_id: str = None, provider_branch: str = None, provider_silent_mode: bool = None, provider_root_directory: str = None, specification: str = None) -> Dict[str, Any]: + """ + Create a new site. + + + Parameters + ---------- + site_id : str + Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + name : str + Site name. Max length: 128 chars. + framework : Framework + Sites framework. + build_runtime : BuildRuntime + Runtime to use during build step. + enabled : bool + Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled. + logging : bool + When disabled, request logs will exclude logs and errors, and site responses will be slightly faster. + timeout : float + Maximum request time in seconds. + install_command : str + Install Command. + build_command : str + Build Command. + output_directory : str + Output Directory for site. + adapter : Adapter + Framework adapter defining rendering strategy. Allowed values are: static, ssr + installation_id : str + Appwrite Installation ID for VCS (Version Control System) deployment. + fallback_file : str + Fallback file for single page application sites. + provider_repository_id : str + Repository ID of the repo linked to the site. + provider_branch : str + Production branch for the repo linked to the site. + provider_silent_mode : bool + Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests. + provider_root_directory : str + Path to site code in the linked repo. + specification : str + Framework specification for the site and builds. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if name is None: + raise AppwriteException('Missing required parameter: "name"') + + if framework is None: + raise AppwriteException('Missing required parameter: "framework"') + + if build_runtime is None: + raise AppwriteException('Missing required parameter: "build_runtime"') + + + api_params['siteId'] = site_id + api_params['name'] = name + api_params['framework'] = framework + api_params['enabled'] = enabled + api_params['logging'] = logging + api_params['timeout'] = timeout + api_params['installCommand'] = install_command + api_params['buildCommand'] = build_command + api_params['outputDirectory'] = output_directory + api_params['buildRuntime'] = build_runtime + api_params['adapter'] = adapter + api_params['installationId'] = installation_id + api_params['fallbackFile'] = fallback_file + api_params['providerRepositoryId'] = provider_repository_id + api_params['providerBranch'] = provider_branch + api_params['providerSilentMode'] = provider_silent_mode + api_params['providerRootDirectory'] = provider_root_directory + api_params['specification'] = specification + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def list_frameworks(self) -> Dict[str, Any]: + """ + Get a list of all frameworks that are currently available on the server instance. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/frameworks' + api_params = {} + + return self.client.call('get', api_path, { + }, api_params) + + def list_specifications(self) -> Dict[str, Any]: + """ + List allowed site specifications for this instance. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/specifications' + api_params = {} + + return self.client.call('get', api_path, { + }, api_params) + + def get(self, site_id: str) -> Dict[str, Any]: + """ + Get a site by its unique ID. + + + Parameters + ---------- + site_id : str + Site ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + api_path = api_path.replace('{siteId}', site_id) + + + return self.client.call('get', api_path, { + }, api_params) + + def update(self, site_id: str, name: str, framework: Framework, enabled: bool = None, logging: bool = None, timeout: float = None, install_command: str = None, build_command: str = None, output_directory: str = None, build_runtime: BuildRuntime = None, adapter: Adapter = None, fallback_file: str = None, installation_id: str = None, provider_repository_id: str = None, provider_branch: str = None, provider_silent_mode: bool = None, provider_root_directory: str = None, specification: str = None) -> Dict[str, Any]: + """ + Update site by its unique ID. + + + Parameters + ---------- + site_id : str + Site ID. + name : str + Site name. Max length: 128 chars. + framework : Framework + Sites framework. + enabled : bool + Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled. + logging : bool + When disabled, request logs will exclude logs and errors, and site responses will be slightly faster. + timeout : float + Maximum request time in seconds. + install_command : str + Install Command. + build_command : str + Build Command. + output_directory : str + Output Directory for site. + build_runtime : BuildRuntime + Runtime to use during build step. + adapter : Adapter + Framework adapter defining rendering strategy. Allowed values are: static, ssr + fallback_file : str + Fallback file for single page application sites. + installation_id : str + Appwrite Installation ID for VCS (Version Control System) deployment. + provider_repository_id : str + Repository ID of the repo linked to the site. + provider_branch : str + Production branch for the repo linked to the site. + provider_silent_mode : bool + Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests. + provider_root_directory : str + Path to site code in the linked repo. + specification : str + Framework specification for the site and builds. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if name is None: + raise AppwriteException('Missing required parameter: "name"') + + if framework is None: + raise AppwriteException('Missing required parameter: "framework"') + + api_path = api_path.replace('{siteId}', site_id) + + api_params['name'] = name + api_params['framework'] = framework + api_params['enabled'] = enabled + api_params['logging'] = logging + api_params['timeout'] = timeout + api_params['installCommand'] = install_command + api_params['buildCommand'] = build_command + api_params['outputDirectory'] = output_directory + api_params['buildRuntime'] = build_runtime + api_params['adapter'] = adapter + api_params['fallbackFile'] = fallback_file + api_params['installationId'] = installation_id + api_params['providerRepositoryId'] = provider_repository_id + api_params['providerBranch'] = provider_branch + api_params['providerSilentMode'] = provider_silent_mode + api_params['providerRootDirectory'] = provider_root_directory + api_params['specification'] = specification + + return self.client.call('put', api_path, { + 'content-type': 'application/json', + }, api_params) + + def delete(self, site_id: str) -> Dict[str, Any]: + """ + Delete a site by its unique ID. + + + Parameters + ---------- + site_id : str + Site ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + api_path = api_path.replace('{siteId}', site_id) + + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) + + def update_site_deployment(self, site_id: str, deployment_id: str) -> Dict[str, Any]: + """ + Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site. + + + Parameters + ---------- + site_id : str + Site ID. + deployment_id : str + Deployment ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployment' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if deployment_id is None: + raise AppwriteException('Missing required parameter: "deployment_id"') + + api_path = api_path.replace('{siteId}', site_id) + + api_params['deploymentId'] = deployment_id + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) + + def list_deployments(self, site_id: str, queries: List[str] = None, search: str = None) -> Dict[str, Any]: + """ + Get a list of all the site's code deployments. You can use the query params to filter your results. + + + Parameters + ---------- + site_id : str + Site ID. + queries : List[str] + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type + search : str + Search term to filter your list results. Max length: 256 chars. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployments' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + api_path = api_path.replace('{siteId}', site_id) + + api_params['queries'] = queries + api_params['search'] = search + + return self.client.call('get', api_path, { + }, api_params) + + def create_deployment(self, site_id: str, code: InputFile, activate: bool, install_command: str = None, build_command: str = None, output_directory: str = None, on_progress = None) -> Dict[str, Any]: + """ + Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID. + + + Parameters + ---------- + site_id : str + Site ID. + code : InputFile + Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory. + activate : bool + Automatically activate the deployment when it is finished building. + install_command : str + Install Commands. + build_command : str + Build Commands. + output_directory : str + Output Directory. + on_progress : callable, optional + Optional callback for upload progress + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployments' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if code is None: + raise AppwriteException('Missing required parameter: "code"') + + if activate is None: + raise AppwriteException('Missing required parameter: "activate"') + + api_path = api_path.replace('{siteId}', site_id) + + api_params['installCommand'] = install_command + api_params['buildCommand'] = build_command + api_params['outputDirectory'] = output_directory + api_params['code'] = str(code).lower() if type(code) is bool else code + api_params['activate'] = str(activate).lower() if type(activate) is bool else activate + + param_name = 'code' + + + upload_id = '' + + return self.client.chunked_upload(api_path, { + 'content-type': 'multipart/form-data', + }, api_params, param_name, on_progress, upload_id) + + def create_duplicate_deployment(self, site_id: str, deployment_id: str) -> Dict[str, Any]: + """ + Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. + + + Parameters + ---------- + site_id : str + Site ID. + deployment_id : str + Deployment ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployments/duplicate' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if deployment_id is None: + raise AppwriteException('Missing required parameter: "deployment_id"') + + api_path = api_path.replace('{siteId}', site_id) + + api_params['deploymentId'] = deployment_id + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def create_template_deployment(self, site_id: str, repository: str, owner: str, root_directory: str, version: str, activate: bool = None) -> Dict[str, Any]: + """ + Create a deployment based on a template. + + Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details. + + + Parameters + ---------- + site_id : str + Site ID. + repository : str + Repository name of the template. + owner : str + The name of the owner of the template. + root_directory : str + Path to site code in the template repo. + version : str + Version (tag) for the repo linked to the site template. + activate : bool + Automatically activate the deployment when it is finished building. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployments/template' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if repository is None: + raise AppwriteException('Missing required parameter: "repository"') + + if owner is None: + raise AppwriteException('Missing required parameter: "owner"') + + if root_directory is None: + raise AppwriteException('Missing required parameter: "root_directory"') + + if version is None: + raise AppwriteException('Missing required parameter: "version"') + + api_path = api_path.replace('{siteId}', site_id) + + api_params['repository'] = repository + api_params['owner'] = owner + api_params['rootDirectory'] = root_directory + api_params['version'] = version + api_params['activate'] = activate + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def create_vcs_deployment(self, site_id: str, type: VCSDeploymentType, reference: str, activate: bool = None) -> Dict[str, Any]: + """ + Create a deployment when a site is connected to VCS. + + This endpoint lets you create deployment from a branch, commit, or a tag. + + + Parameters + ---------- + site_id : str + Site ID. + type : VCSDeploymentType + Type of reference passed. Allowed values are: branch, commit + reference : str + VCS reference to create deployment from. Depending on type this can be: branch name, commit hash + activate : bool + Automatically activate the deployment when it is finished building. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployments/vcs' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if type is None: + raise AppwriteException('Missing required parameter: "type"') + + if reference is None: + raise AppwriteException('Missing required parameter: "reference"') + + api_path = api_path.replace('{siteId}', site_id) + + api_params['type'] = type + api_params['reference'] = reference + api_params['activate'] = activate + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def get_deployment(self, site_id: str, deployment_id: str) -> Dict[str, Any]: + """ + Get a site deployment by its unique ID. + + + Parameters + ---------- + site_id : str + Site ID. + deployment_id : str + Deployment ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployments/{deploymentId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if deployment_id is None: + raise AppwriteException('Missing required parameter: "deployment_id"') + + api_path = api_path.replace('{siteId}', site_id) + api_path = api_path.replace('{deploymentId}', deployment_id) + + + return self.client.call('get', api_path, { + }, api_params) + + def delete_deployment(self, site_id: str, deployment_id: str) -> Dict[str, Any]: + """ + Delete a site deployment by its unique ID. + + + Parameters + ---------- + site_id : str + Site ID. + deployment_id : str + Deployment ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployments/{deploymentId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if deployment_id is None: + raise AppwriteException('Missing required parameter: "deployment_id"') + + api_path = api_path.replace('{siteId}', site_id) + api_path = api_path.replace('{deploymentId}', deployment_id) + + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) + + def get_deployment_download(self, site_id: str, deployment_id: str, type: DeploymentDownloadType = None) -> bytes: + """ + Get a site deployment 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 + ---------- + site_id : str + Site ID. + deployment_id : str + Deployment ID. + type : DeploymentDownloadType + Deployment file to download. Can be: "source", "output". + + Returns + ------- + bytes + Response as bytes + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployments/{deploymentId}/download' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if deployment_id is None: + raise AppwriteException('Missing required parameter: "deployment_id"') + + api_path = api_path.replace('{siteId}', site_id) + api_path = api_path.replace('{deploymentId}', deployment_id) + + api_params['type'] = type + + return self.client.call('get', api_path, { + }, api_params) + + def update_deployment_status(self, site_id: str, deployment_id: str) -> Dict[str, Any]: + """ + Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. + + + Parameters + ---------- + site_id : str + Site ID. + deployment_id : str + Deployment ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/deployments/{deploymentId}/status' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if deployment_id is None: + raise AppwriteException('Missing required parameter: "deployment_id"') + + api_path = api_path.replace('{siteId}', site_id) + api_path = api_path.replace('{deploymentId}', deployment_id) + + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) + + def list_logs(self, site_id: str, queries: List[str] = None) -> Dict[str, Any]: + """ + Get a list of all site logs. You can use the query params to filter your results. + + + Parameters + ---------- + site_id : str + Site ID. + queries : List[str] + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/logs' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + api_path = api_path.replace('{siteId}', site_id) + + api_params['queries'] = queries + + return self.client.call('get', api_path, { + }, api_params) + + def get_log(self, site_id: str, log_id: str) -> Dict[str, Any]: + """ + Get a site request log by its unique ID. + + + Parameters + ---------- + site_id : str + Site ID. + log_id : str + Log ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/logs/{logId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if log_id is None: + raise AppwriteException('Missing required parameter: "log_id"') + + api_path = api_path.replace('{siteId}', site_id) + api_path = api_path.replace('{logId}', log_id) + + + return self.client.call('get', api_path, { + }, api_params) + + def delete_log(self, site_id: str, log_id: str) -> Dict[str, Any]: + """ + Delete a site log by its unique ID. + + + Parameters + ---------- + site_id : str + Site ID. + log_id : str + Log ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/logs/{logId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if log_id is None: + raise AppwriteException('Missing required parameter: "log_id"') + + api_path = api_path.replace('{siteId}', site_id) + api_path = api_path.replace('{logId}', log_id) + + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) + + def list_variables(self, site_id: str) -> Dict[str, Any]: + """ + Get a list of all variables of a specific site. + + + Parameters + ---------- + site_id : str + Site unique ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/variables' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + api_path = api_path.replace('{siteId}', site_id) + + + return self.client.call('get', api_path, { + }, api_params) + + def create_variable(self, site_id: str, key: str, value: str, secret: bool = None) -> Dict[str, Any]: + """ + Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables. + + + Parameters + ---------- + site_id : str + Site unique ID. + key : str + Variable key. Max length: 255 chars. + value : str + Variable value. Max length: 8192 chars. + secret : bool + Secret variables can be updated or deleted, but only sites can read them during build and runtime. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/variables' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if key is None: + raise AppwriteException('Missing required parameter: "key"') + + if value is None: + raise AppwriteException('Missing required parameter: "value"') + + api_path = api_path.replace('{siteId}', site_id) + + api_params['key'] = key + api_params['value'] = value + api_params['secret'] = secret + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def get_variable(self, site_id: str, variable_id: str) -> Dict[str, Any]: + """ + Get a variable by its unique ID. + + + Parameters + ---------- + site_id : str + Site unique ID. + variable_id : str + Variable unique ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/variables/{variableId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if variable_id is None: + raise AppwriteException('Missing required parameter: "variable_id"') + + api_path = api_path.replace('{siteId}', site_id) + api_path = api_path.replace('{variableId}', variable_id) + + + return self.client.call('get', api_path, { + }, api_params) + + def update_variable(self, site_id: str, variable_id: str, key: str, value: str = None, secret: bool = None) -> Dict[str, Any]: + """ + Update variable by its unique ID. + + + Parameters + ---------- + site_id : str + Site unique ID. + variable_id : str + Variable unique ID. + key : str + Variable key. Max length: 255 chars. + value : str + Variable value. Max length: 8192 chars. + secret : bool + Secret variables can be updated or deleted, but only sites can read them during build and runtime. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/variables/{variableId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if variable_id is None: + raise AppwriteException('Missing required parameter: "variable_id"') + + if key is None: + raise AppwriteException('Missing required parameter: "key"') + + api_path = api_path.replace('{siteId}', site_id) + api_path = api_path.replace('{variableId}', variable_id) + + api_params['key'] = key + api_params['value'] = value + api_params['secret'] = secret + + return self.client.call('put', api_path, { + 'content-type': 'application/json', + }, api_params) + + def delete_variable(self, site_id: str, variable_id: str) -> Dict[str, Any]: + """ + Delete a variable by its unique ID. + + + Parameters + ---------- + site_id : str + Site unique ID. + variable_id : str + Variable unique ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/sites/{siteId}/variables/{variableId}' + api_params = {} + if site_id is None: + raise AppwriteException('Missing required parameter: "site_id"') + + if variable_id is None: + raise AppwriteException('Missing required parameter: "variable_id"') + + api_path = api_path.replace('{siteId}', site_id) + api_path = api_path.replace('{variableId}', variable_id) + + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) diff --git a/appwrite/services/storage.py b/appwrite/services/storage.py index 610e11e..e970187 100644 --- a/appwrite/services/storage.py +++ b/appwrite/services/storage.py @@ -15,6 +15,7 @@ def list_buckets(self, queries: List[str] = None, search: str = None) -> Dict[st """ Get a list of all the storage buckets. You can use the query params to filter your results. + Parameters ---------- queries : List[str] @@ -46,6 +47,7 @@ def create_bucket(self, bucket_id: str, name: str, permissions: List[str] = None """ Create a new storage bucket. + Parameters ---------- bucket_id : str @@ -108,6 +110,7 @@ def get_bucket(self, bucket_id: str) -> Dict[str, Any]: """ Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata. + Parameters ---------- bucket_id : str @@ -139,6 +142,7 @@ def update_bucket(self, bucket_id: str, name: str, permissions: List[str] = None """ Update a storage bucket by its unique ID. + Parameters ---------- bucket_id : str @@ -201,6 +205,7 @@ def delete_bucket(self, bucket_id: str) -> Dict[str, Any]: """ Delete a storage bucket by its unique ID. + Parameters ---------- bucket_id : str @@ -233,6 +238,7 @@ def list_files(self, bucket_id: str, queries: List[str] = None, search: str = No """ Get a list of all the user files. You can use the query params to filter your results. + Parameters ---------- bucket_id : str @@ -277,6 +283,7 @@ def create_file(self, bucket_id: str, file_id: str, file: InputFile, permissions If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. + Parameters ---------- bucket_id : str @@ -332,6 +339,7 @@ def get_file(self, bucket_id: str, file_id: str) -> Dict[str, Any]: """ Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata. + Parameters ---------- bucket_id : str @@ -369,6 +377,7 @@ def update_file(self, bucket_id: str, file_id: str, name: str = None, permission """ Update a file by its unique ID. Only users with write permissions have access to update this resource. + Parameters ---------- bucket_id : str @@ -413,6 +422,7 @@ def delete_file(self, bucket_id: str, file_id: str) -> Dict[str, Any]: """ Delete a file by its unique ID. Only users with write permissions have access to delete this resource. + Parameters ---------- bucket_id : str @@ -447,16 +457,19 @@ def delete_file(self, bucket_id: str, file_id: str) -> Dict[str, Any]: 'content-type': 'application/json', }, api_params) - def get_file_download(self, bucket_id: str, file_id: str) -> bytes: + def get_file_download(self, bucket_id: str, file_id: str, token: str = None) -> bytes: """ Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. + Parameters ---------- bucket_id : str Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). file_id : str File ID. + token : str + File token for accessing this file. Returns ------- @@ -480,14 +493,16 @@ def get_file_download(self, bucket_id: str, file_id: str) -> bytes: api_path = api_path.replace('{bucketId}', bucket_id) api_path = api_path.replace('{fileId}', file_id) + api_params['token'] = token return self.client.call('get', api_path, { }, api_params) - def get_file_preview(self, bucket_id: str, file_id: str, width: float = None, height: float = None, gravity: ImageGravity = None, quality: float = None, border_width: float = None, border_color: str = None, border_radius: float = None, opacity: float = None, rotation: float = None, background: str = None, output: ImageFormat = None) -> bytes: + def get_file_preview(self, bucket_id: str, file_id: str, width: float = None, height: float = None, gravity: ImageGravity = None, quality: float = None, border_width: float = None, border_color: str = None, border_radius: float = None, opacity: float = None, rotation: float = None, background: str = None, output: ImageFormat = None, token: str = None) -> bytes: """ 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. Preview is supported only for image files smaller than 10MB. + Parameters ---------- bucket_id : str @@ -501,7 +516,7 @@ def get_file_preview(self, bucket_id: str, file_id: str, width: float = None, he gravity : ImageGravity Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right quality : float - Preview image quality. Pass an integer between 0 to 100. Defaults to 100. + Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. border_width : float Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0. border_color : str @@ -516,6 +531,8 @@ def get_file_preview(self, bucket_id: str, file_id: str, width: float = None, he Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. output : ImageFormat Output format type (jpeg, jpg, png, gif and webp). + token : str + File token for accessing this file. Returns ------- @@ -550,20 +567,24 @@ def get_file_preview(self, bucket_id: str, file_id: str, width: float = None, he api_params['rotation'] = rotation api_params['background'] = background api_params['output'] = output + api_params['token'] = token return self.client.call('get', api_path, { }, api_params) - def get_file_view(self, bucket_id: str, file_id: str) -> bytes: + def get_file_view(self, bucket_id: str, file_id: str, token: str = None) -> bytes: """ Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. + Parameters ---------- bucket_id : str Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). file_id : str File ID. + token : str + File token for accessing this file. Returns ------- @@ -587,6 +608,7 @@ def get_file_view(self, bucket_id: str, file_id: str) -> bytes: api_path = api_path.replace('{bucketId}', bucket_id) api_path = api_path.replace('{fileId}', file_id) + api_params['token'] = token return self.client.call('get', api_path, { }, api_params) diff --git a/appwrite/services/teams.py b/appwrite/services/teams.py index 778cd07..50e0297 100644 --- a/appwrite/services/teams.py +++ b/appwrite/services/teams.py @@ -11,6 +11,7 @@ def list(self, queries: List[str] = None, search: str = None) -> Dict[str, Any]: """ Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. + Parameters ---------- queries : List[str] @@ -42,6 +43,7 @@ def create(self, team_id: str, name: str, roles: List[str] = None) -> Dict[str, """ Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. + Parameters ---------- team_id : str @@ -83,6 +85,7 @@ def get(self, team_id: str) -> Dict[str, Any]: """ Get a team by its ID. All team members have read access for this resource. + Parameters ---------- team_id : str @@ -114,6 +117,7 @@ def update_name(self, team_id: str, name: str) -> Dict[str, Any]: """ Update the team's name by its unique ID. + Parameters ---------- team_id : str @@ -152,6 +156,7 @@ def delete(self, team_id: str) -> Dict[str, Any]: """ Delete a team using its ID. Only team members with the owner role can delete the team. + Parameters ---------- team_id : str @@ -184,12 +189,13 @@ def list_memberships(self, team_id: str, queries: List[str] = None, search: str """ Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console. + Parameters ---------- team_id : str Team ID. queries : List[str] - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles search : str Search term to filter your list results. Max length: 256 chars. @@ -228,6 +234,7 @@ def create_membership(self, team_id: str, roles: List[str], email: str = None, u Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. + Parameters ---------- team_id : str @@ -281,6 +288,7 @@ def get_membership(self, team_id: str, membership_id: str) -> Dict[str, Any]: """ Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console. + Parameters ---------- team_id : str @@ -319,6 +327,7 @@ def update_membership(self, team_id: str, membership_id: str, roles: List[str]) Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). + Parameters ---------- team_id : str @@ -363,6 +372,7 @@ def delete_membership(self, team_id: str, membership_id: str) -> Dict[str, Any]: """ This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted. + Parameters ---------- team_id : str @@ -404,6 +414,7 @@ def update_membership_status(self, team_id: str, membership_id: str, user_id: st If the request is successful, a session for the user is automatically created. + Parameters ---------- team_id : str @@ -454,6 +465,7 @@ def get_prefs(self, team_id: str) -> Dict[str, Any]: """ Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). + Parameters ---------- team_id : str @@ -485,6 +497,7 @@ def update_prefs(self, team_id: str, prefs: dict) -> Dict[str, Any]: """ Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. + Parameters ---------- team_id : str diff --git a/appwrite/services/tokens.py b/appwrite/services/tokens.py new file mode 100644 index 0000000..93ba739 --- /dev/null +++ b/appwrite/services/tokens.py @@ -0,0 +1,192 @@ +from ..service import Service +from typing import List, Dict, Any +from ..exception import AppwriteException + +class Tokens(Service): + + def __init__(self, client) -> None: + super(Tokens, self).__init__(client) + + def list(self, bucket_id: str, file_id: str, queries: List[str] = None) -> Dict[str, Any]: + """ + List all the tokens created for a specific file or bucket. You can use the query params to filter your results. + + + Parameters + ---------- + bucket_id : str + Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). + file_id : str + File unique ID. + queries : List[str] + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/tokens/buckets/{bucketId}/files/{fileId}' + api_params = {} + if bucket_id is None: + raise AppwriteException('Missing required parameter: "bucket_id"') + + if file_id is None: + raise AppwriteException('Missing required parameter: "file_id"') + + api_path = api_path.replace('{bucketId}', bucket_id) + api_path = api_path.replace('{fileId}', file_id) + + api_params['queries'] = queries + + return self.client.call('get', api_path, { + }, api_params) + + def create_file_token(self, bucket_id: str, file_id: str, expire: str = None) -> Dict[str, Any]: + """ + Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter. + + + Parameters + ---------- + bucket_id : str + Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). + file_id : str + File unique ID. + expire : str + Token expiry date + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/tokens/buckets/{bucketId}/files/{fileId}' + api_params = {} + if bucket_id is None: + raise AppwriteException('Missing required parameter: "bucket_id"') + + if file_id is None: + raise AppwriteException('Missing required parameter: "file_id"') + + api_path = api_path.replace('{bucketId}', bucket_id) + api_path = api_path.replace('{fileId}', file_id) + + api_params['expire'] = expire + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def get(self, token_id: str) -> Dict[str, Any]: + """ + Get a token by its unique ID. + + + Parameters + ---------- + token_id : str + Token ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/tokens/{tokenId}' + api_params = {} + if token_id is None: + raise AppwriteException('Missing required parameter: "token_id"') + + api_path = api_path.replace('{tokenId}', token_id) + + + return self.client.call('get', api_path, { + }, api_params) + + def update(self, token_id: str, expire: str = None) -> Dict[str, Any]: + """ + Update a token by its unique ID. Use this endpoint to update a token's expiry date. + + + Parameters + ---------- + token_id : str + Token unique ID. + expire : str + File token expiry date + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/tokens/{tokenId}' + api_params = {} + if token_id is None: + raise AppwriteException('Missing required parameter: "token_id"') + + api_path = api_path.replace('{tokenId}', token_id) + + api_params['expire'] = expire + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) + + def delete(self, token_id: str) -> Dict[str, Any]: + """ + Delete a token by its unique ID. + + + Parameters + ---------- + token_id : str + Token ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/tokens/{tokenId}' + api_params = {} + if token_id is None: + raise AppwriteException('Missing required parameter: "token_id"') + + api_path = api_path.replace('{tokenId}', token_id) + + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) diff --git a/appwrite/services/users.py b/appwrite/services/users.py index 532c69f..1af4e41 100644 --- a/appwrite/services/users.py +++ b/appwrite/services/users.py @@ -14,6 +14,7 @@ def list(self, queries: List[str] = None, search: str = None) -> Dict[str, Any]: """ Get a list of all the project's users. You can use the query params to filter your results. + Parameters ---------- queries : List[str] @@ -45,6 +46,7 @@ def create(self, user_id: str, email: str = None, phone: str = None, password: s """ Create a new user. + Parameters ---------- user_id : str @@ -89,6 +91,7 @@ def create_argon2_user(self, user_id: str, email: str, password: str, name: str """ Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. + Parameters ---------- user_id : str @@ -136,6 +139,7 @@ def create_bcrypt_user(self, user_id: str, email: str, password: str, name: str """ Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. + Parameters ---------- user_id : str @@ -183,6 +187,7 @@ def list_identities(self, queries: List[str] = None, search: str = None) -> Dict """ Get identities for all users. + Parameters ---------- queries : List[str] @@ -214,6 +219,7 @@ def delete_identity(self, identity_id: str) -> Dict[str, Any]: """ Delete an identity by its unique ID. + Parameters ---------- identity_id : str @@ -246,6 +252,7 @@ def create_md5_user(self, user_id: str, email: str, password: str, name: str = N """ Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. + Parameters ---------- user_id : str @@ -293,6 +300,7 @@ def create_ph_pass_user(self, user_id: str, email: str, password: str, name: str """ Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. + Parameters ---------- user_id : str @@ -340,6 +348,7 @@ def create_scrypt_user(self, user_id: str, email: str, password: str, password_s """ Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. + Parameters ---------- user_id : str @@ -417,6 +426,7 @@ def create_scrypt_modified_user(self, user_id: str, email: str, password: str, p """ Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. + Parameters ---------- user_id : str @@ -482,6 +492,7 @@ def create_sha_user(self, user_id: str, email: str, password: str, password_vers """ Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. + Parameters ---------- user_id : str @@ -532,6 +543,7 @@ def get(self, user_id: str) -> Dict[str, Any]: """ Get a user by its unique ID. + Parameters ---------- user_id : str @@ -563,6 +575,7 @@ def delete(self, user_id: str) -> Dict[str, Any]: """ Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead. + Parameters ---------- user_id : str @@ -595,6 +608,7 @@ def update_email(self, user_id: str, email: str) -> Dict[str, Any]: """ Update the user email by its unique ID. + Parameters ---------- user_id : str @@ -633,6 +647,7 @@ def create_jwt(self, user_id: str, session_id: str = None, duration: float = Non """ Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted. + Parameters ---------- user_id : str @@ -673,6 +688,7 @@ def update_labels(self, user_id: str, labels: List[str]) -> Dict[str, Any]: Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. + Parameters ---------- user_id : str @@ -711,6 +727,7 @@ def list_logs(self, user_id: str, queries: List[str] = None) -> Dict[str, Any]: """ Get the user activity logs list by its unique ID. + Parameters ---------- user_id : str @@ -741,14 +758,19 @@ def list_logs(self, user_id: str, queries: List[str] = None) -> Dict[str, Any]: return self.client.call('get', api_path, { }, api_params) - def list_memberships(self, user_id: str) -> Dict[str, Any]: + def list_memberships(self, user_id: str, queries: List[str] = None, search: str = None) -> Dict[str, Any]: """ Get the user membership list by its unique ID. + Parameters ---------- user_id : str User ID. + queries : List[str] + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles + search : str + Search term to filter your list results. Max length: 256 chars. Returns ------- @@ -768,6 +790,8 @@ def list_memberships(self, user_id: str) -> Dict[str, Any]: api_path = api_path.replace('{userId}', user_id) + api_params['queries'] = queries + api_params['search'] = search return self.client.call('get', api_path, { }, api_params) @@ -776,6 +800,7 @@ def update_mfa(self, user_id: str, mfa: bool) -> Dict[str, Any]: """ Enable or disable MFA on a user account. + Parameters ---------- user_id : str @@ -814,6 +839,7 @@ def delete_mfa_authenticator(self, user_id: str, type: AuthenticatorType) -> Dic """ Delete an authenticator app. + Parameters ---------- user_id : str @@ -852,6 +878,7 @@ def list_mfa_factors(self, user_id: str) -> Dict[str, Any]: """ List the factors available on the account to be used as a MFA challange. + Parameters ---------- user_id : str @@ -883,6 +910,7 @@ def get_mfa_recovery_codes(self, user_id: str) -> Dict[str, Any]: """ Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. + Parameters ---------- user_id : str @@ -914,6 +942,7 @@ def update_mfa_recovery_codes(self, user_id: str) -> Dict[str, Any]: """ Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. + Parameters ---------- user_id : str @@ -946,6 +975,7 @@ def create_mfa_recovery_codes(self, user_id: str) -> Dict[str, Any]: """ Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK. + Parameters ---------- user_id : str @@ -978,6 +1008,7 @@ def update_name(self, user_id: str, name: str) -> Dict[str, Any]: """ Update the user name by its unique ID. + Parameters ---------- user_id : str @@ -1016,6 +1047,7 @@ def update_password(self, user_id: str, password: str) -> Dict[str, Any]: """ Update the user password by its unique ID. + Parameters ---------- user_id : str @@ -1054,6 +1086,7 @@ def update_phone(self, user_id: str, number: str) -> Dict[str, Any]: """ Update the user phone by its unique ID. + Parameters ---------- user_id : str @@ -1092,6 +1125,7 @@ def get_prefs(self, user_id: str) -> Dict[str, Any]: """ Get the user preferences by its unique ID. + Parameters ---------- user_id : str @@ -1123,6 +1157,7 @@ def update_prefs(self, user_id: str, prefs: dict) -> Dict[str, Any]: """ Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. + Parameters ---------- user_id : str @@ -1161,6 +1196,7 @@ def list_sessions(self, user_id: str) -> Dict[str, Any]: """ Get the user sessions list by its unique ID. + Parameters ---------- user_id : str @@ -1194,6 +1230,7 @@ def create_session(self, user_id: str) -> Dict[str, Any]: If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. + Parameters ---------- user_id : str @@ -1226,6 +1263,7 @@ def delete_sessions(self, user_id: str) -> Dict[str, Any]: """ Delete all user's sessions by using the user's unique ID. + Parameters ---------- user_id : str @@ -1258,6 +1296,7 @@ def delete_session(self, user_id: str, session_id: str) -> Dict[str, Any]: """ Delete a user sessions by its unique ID. + Parameters ---------- user_id : str @@ -1296,6 +1335,7 @@ def update_status(self, user_id: str, status: bool) -> Dict[str, Any]: """ Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved. + Parameters ---------- user_id : str @@ -1334,12 +1374,13 @@ def list_targets(self, user_id: str, queries: List[str] = None) -> Dict[str, Any """ List the messaging targets that are associated with a user. + Parameters ---------- user_id : str User ID. queries : List[str] - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels + Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType Returns ------- @@ -1368,6 +1409,7 @@ def create_target(self, user_id: str, target_id: str, provider_type: MessagingPr """ Create a messaging target. + Parameters ---------- user_id : str @@ -1424,6 +1466,7 @@ def get_target(self, user_id: str, target_id: str) -> Dict[str, Any]: """ Get a user's push notification target by ID. + Parameters ---------- user_id : str @@ -1461,6 +1504,7 @@ def update_target(self, user_id: str, target_id: str, identifier: str = None, pr """ Update a messaging target. + Parameters ---------- user_id : str @@ -1508,6 +1552,7 @@ def delete_target(self, user_id: str, target_id: str) -> Dict[str, Any]: """ Delete a messaging target. + Parameters ---------- user_id : str @@ -1547,6 +1592,7 @@ def create_token(self, user_id: str, length: float = None, expire: float = None) Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. + Parameters ---------- user_id : str @@ -1585,6 +1631,7 @@ def update_email_verification(self, user_id: str, email_verification: bool) -> D """ Update the user email verification status by its unique ID. + Parameters ---------- user_id : str @@ -1623,6 +1670,7 @@ def update_phone_verification(self, user_id: str, phone_verification: bool) -> D """ Update the user phone verification status by its unique ID. + Parameters ---------- user_id : str diff --git a/docs/examples/account/create-anonymous-session.md b/docs/examples/account/create-anonymous-session.md index ce5a92a..c3b7a87 100644 --- a/docs/examples/account/create-anonymous-session.md +++ b/docs/examples/account/create-anonymous-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/create-email-password-session.md b/docs/examples/account/create-email-password-session.md index 5e869fd..e831821 100644 --- a/docs/examples/account/create-email-password-session.md +++ b/docs/examples/account/create-email-password-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/create-email-token.md b/docs/examples/account/create-email-token.md index 5cf2bfb..7ff4f6b 100644 --- a/docs/examples/account/create-email-token.md +++ b/docs/examples/account/create-email-token.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/create-j-w-t.md b/docs/examples/account/create-j-w-t.md index c737f1b..172f45f 100644 --- a/docs/examples/account/create-j-w-t.md +++ b/docs/examples/account/create-j-w-t.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/create-magic-u-r-l-token.md b/docs/examples/account/create-magic-u-r-l-token.md index 0077817..14e76ed 100644 --- a/docs/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/account/create-magic-u-r-l-token.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/create-mfa-authenticator.md b/docs/examples/account/create-mfa-authenticator.md index a6f09eb..70cee1d 100644 --- a/docs/examples/account/create-mfa-authenticator.md +++ b/docs/examples/account/create-mfa-authenticator.md @@ -3,7 +3,7 @@ from appwrite.services.account import Account from appwrite.enums import AuthenticatorType client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/create-mfa-challenge.md b/docs/examples/account/create-mfa-challenge.md index deb4c9c..abd746c 100644 --- a/docs/examples/account/create-mfa-challenge.md +++ b/docs/examples/account/create-mfa-challenge.md @@ -3,7 +3,7 @@ from appwrite.services.account import Account from appwrite.enums import AuthenticationFactor client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/create-mfa-recovery-codes.md b/docs/examples/account/create-mfa-recovery-codes.md index a149cb9..69aaa60 100644 --- a/docs/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/account/create-mfa-recovery-codes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/create-o-auth2token.md b/docs/examples/account/create-o-auth2token.md index fa11d31..2dc171b 100644 --- a/docs/examples/account/create-o-auth2token.md +++ b/docs/examples/account/create-o-auth2token.md @@ -3,7 +3,7 @@ from appwrite.services.account import Account from appwrite.enums import OAuthProvider client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/create-phone-token.md b/docs/examples/account/create-phone-token.md index d242d71..06c2b20 100644 --- a/docs/examples/account/create-phone-token.md +++ b/docs/examples/account/create-phone-token.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/create-phone-verification.md b/docs/examples/account/create-phone-verification.md index bb2058e..c130646 100644 --- a/docs/examples/account/create-phone-verification.md +++ b/docs/examples/account/create-phone-verification.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/create-recovery.md b/docs/examples/account/create-recovery.md index 3d215a4..51c1777 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/examples/account/create-recovery.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/create-session.md b/docs/examples/account/create-session.md index d00e8cb..1048dfe 100644 --- a/docs/examples/account/create-session.md +++ b/docs/examples/account/create-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/create-verification.md b/docs/examples/account/create-verification.md index 329d19e..d66fc2c 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/examples/account/create-verification.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/create.md b/docs/examples/account/create.md index 39b33c6..7eda5a3 100644 --- a/docs/examples/account/create.md +++ b/docs/examples/account/create.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/delete-identity.md b/docs/examples/account/delete-identity.md index 3556122..0c894fa 100644 --- a/docs/examples/account/delete-identity.md +++ b/docs/examples/account/delete-identity.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/delete-mfa-authenticator.md b/docs/examples/account/delete-mfa-authenticator.md index 939ea71..83709c7 100644 --- a/docs/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/account/delete-mfa-authenticator.md @@ -3,7 +3,7 @@ from appwrite.services.account import Account from appwrite.enums import AuthenticatorType client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/delete-session.md b/docs/examples/account/delete-session.md index 9ddb443..5967d70 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index 751ab9b..5061f84 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/get-mfa-recovery-codes.md b/docs/examples/account/get-mfa-recovery-codes.md index f70b968..c8fe494 100644 --- a/docs/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/account/get-mfa-recovery-codes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index 52df645..d577b4b 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/get-session.md b/docs/examples/account/get-session.md index f38466f..3e2937b 100644 --- a/docs/examples/account/get-session.md +++ b/docs/examples/account/get-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/get.md b/docs/examples/account/get.md index b414047..5426228 100644 --- a/docs/examples/account/get.md +++ b/docs/examples/account/get.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/list-identities.md b/docs/examples/account/list-identities.md index 4bf9beb..aeb23be 100644 --- a/docs/examples/account/list-identities.md +++ b/docs/examples/account/list-identities.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/list-logs.md index 5d8c27a..67d193d 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/list-logs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/list-mfa-factors.md b/docs/examples/account/list-mfa-factors.md index ba3796b..72a3924 100644 --- a/docs/examples/account/list-mfa-factors.md +++ b/docs/examples/account/list-mfa-factors.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md index 7473313..c553a7b 100644 --- a/docs/examples/account/list-sessions.md +++ b/docs/examples/account/list-sessions.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index 004d071..14de4fd 100644 --- a/docs/examples/account/update-email.md +++ b/docs/examples/account/update-email.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-m-f-a.md b/docs/examples/account/update-m-f-a.md index 2f9321c..7083d09 100644 --- a/docs/examples/account/update-m-f-a.md +++ b/docs/examples/account/update-m-f-a.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-magic-u-r-l-session.md b/docs/examples/account/update-magic-u-r-l-session.md index ca8e8e5..0146083 100644 --- a/docs/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/account/update-magic-u-r-l-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/update-mfa-authenticator.md b/docs/examples/account/update-mfa-authenticator.md index a5a9519..d53607f 100644 --- a/docs/examples/account/update-mfa-authenticator.md +++ b/docs/examples/account/update-mfa-authenticator.md @@ -3,7 +3,7 @@ from appwrite.services.account import Account from appwrite.enums import AuthenticatorType client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-mfa-challenge.md b/docs/examples/account/update-mfa-challenge.md index d28a251..cfc58c5 100644 --- a/docs/examples/account/update-mfa-challenge.md +++ b/docs/examples/account/update-mfa-challenge.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-mfa-recovery-codes.md b/docs/examples/account/update-mfa-recovery-codes.md index 38cb41c..51718eb 100644 --- a/docs/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/account/update-mfa-recovery-codes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index 9b4bf82..534a94e 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index ecb4228..3c072e3 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-phone-session.md b/docs/examples/account/update-phone-session.md index d29ab28..52e7723 100644 --- a/docs/examples/account/update-phone-session.md +++ b/docs/examples/account/update-phone-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID account = Account(client) diff --git a/docs/examples/account/update-phone-verification.md b/docs/examples/account/update-phone-verification.md index e64d79f..bcc57de 100644 --- a/docs/examples/account/update-phone-verification.md +++ b/docs/examples/account/update-phone-verification.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-phone.md b/docs/examples/account/update-phone.md index 65a6a38..a2cb7d3 100644 --- a/docs/examples/account/update-phone.md +++ b/docs/examples/account/update-phone.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-prefs.md b/docs/examples/account/update-prefs.md index c368300..e2ac7a2 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/examples/account/update-prefs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index 2493dc5..ed140ab 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-session.md b/docs/examples/account/update-session.md index ee3a2f7..abee773 100644 --- a/docs/examples/account/update-session.md +++ b/docs/examples/account/update-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-status.md b/docs/examples/account/update-status.md index c8318a4..a5272f0 100644 --- a/docs/examples/account/update-status.md +++ b/docs/examples/account/update-status.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index 63a7f26..fbc7af5 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/examples/account/update-verification.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.account import Account client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/avatars/get-browser.md b/docs/examples/avatars/get-browser.md index 7ed8318..ff11b8b 100644 --- a/docs/examples/avatars/get-browser.md +++ b/docs/examples/avatars/get-browser.md @@ -3,7 +3,7 @@ from appwrite.services.avatars import Avatars from appwrite.enums import Browser client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with @@ -13,5 +13,5 @@ result = avatars.get_browser( code = Browser.AVANT_BROWSER, width = 0, # optional height = 0, # optional - quality = 0 # optional + quality = -1 # optional ) diff --git a/docs/examples/avatars/get-credit-card.md b/docs/examples/avatars/get-credit-card.md index aa66b86..286f4d3 100644 --- a/docs/examples/avatars/get-credit-card.md +++ b/docs/examples/avatars/get-credit-card.md @@ -3,7 +3,7 @@ from appwrite.services.avatars import Avatars from appwrite.enums import CreditCard client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with @@ -13,5 +13,5 @@ result = avatars.get_credit_card( code = CreditCard.AMERICAN_EXPRESS, width = 0, # optional height = 0, # optional - quality = 0 # optional + quality = -1 # optional ) diff --git a/docs/examples/avatars/get-favicon.md b/docs/examples/avatars/get-favicon.md index 2c6a67e..f034ea4 100644 --- a/docs/examples/avatars/get-favicon.md +++ b/docs/examples/avatars/get-favicon.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.avatars import Avatars client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/avatars/get-flag.md b/docs/examples/avatars/get-flag.md index 435c855..6365a78 100644 --- a/docs/examples/avatars/get-flag.md +++ b/docs/examples/avatars/get-flag.md @@ -3,7 +3,7 @@ from appwrite.services.avatars import Avatars from appwrite.enums import Flag client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with @@ -13,5 +13,5 @@ result = avatars.get_flag( code = Flag.AFGHANISTAN, width = 0, # optional height = 0, # optional - quality = 0 # optional + quality = -1 # optional ) diff --git a/docs/examples/avatars/get-image.md b/docs/examples/avatars/get-image.md index ee9e0cb..9272c4d 100644 --- a/docs/examples/avatars/get-image.md +++ b/docs/examples/avatars/get-image.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.avatars import Avatars client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/avatars/get-initials.md b/docs/examples/avatars/get-initials.md index edcbbb3..2729ff5 100644 --- a/docs/examples/avatars/get-initials.md +++ b/docs/examples/avatars/get-initials.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.avatars import Avatars client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/avatars/get-q-r.md b/docs/examples/avatars/get-q-r.md index 7f6da32..3fb76a7 100644 --- a/docs/examples/avatars/get-q-r.md +++ b/docs/examples/avatars/get-q-r.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.avatars import Avatars client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index 2b4209d..f12f446 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index 99c44a2..596d4a9 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index db81c02..8fd59e6 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-document.md b/docs/examples/databases/create-document.md index 22f2c07..1eaf024 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/examples/databases/create-document.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/databases/create-documents.md b/docs/examples/databases/create-documents.md new file mode 100644 index 0000000..1b94e51 --- /dev/null +++ b/docs/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +databases = Databases(client) + +result = databases.create_documents( + database_id = '', + collection_id = '', + documents = [] +) diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index 2e28e0b..230567a 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index b1efdc7..de1ceb9 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index b36863b..53305c8 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index 9885c06..f7bb455 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -3,7 +3,7 @@ from appwrite.services.databases import Databases from appwrite.enums import IndexType client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key @@ -15,5 +15,6 @@ result = databases.create_index( key = '', type = IndexType.KEY, attributes = [], - orders = [] # optional + orders = [], # optional + lengths = [] # optional ) diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index 8cb140a..92e8b0f 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index d4b4ab6..a7f424b 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index 4172c27..6c8f4dc 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -3,7 +3,7 @@ from appwrite.services.databases import Databases from appwrite.enums import RelationshipType client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index e696871..dc434cc 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index 4ad03c4..af37573 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index d5cbb99..0492203 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/decrement-document-attribute.md b/docs/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000..397bdd4 --- /dev/null +++ b/docs/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +databases = Databases(client) + +result = databases.decrement_document_attribute( + database_id = '', + collection_id = '', + document_id = '', + attribute = '', + value = None, # optional + min = None # optional +) diff --git a/docs/examples/databases/delete-attribute.md b/docs/examples/databases/delete-attribute.md index b317ba9..e1c4eec 100644 --- a/docs/examples/databases/delete-attribute.md +++ b/docs/examples/databases/delete-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/delete-collection.md b/docs/examples/databases/delete-collection.md index ab274c6..02f1e1c 100644 --- a/docs/examples/databases/delete-collection.md +++ b/docs/examples/databases/delete-collection.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/delete-document.md b/docs/examples/databases/delete-document.md index 69151aa..57f8b3b 100644 --- a/docs/examples/databases/delete-document.md +++ b/docs/examples/databases/delete-document.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/databases/delete-documents.md b/docs/examples/databases/delete-documents.md new file mode 100644 index 0000000..a315f0c --- /dev/null +++ b/docs/examples/databases/delete-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +databases = Databases(client) + +result = databases.delete_documents( + database_id = '', + collection_id = '', + queries = [] # optional +) diff --git a/docs/examples/databases/delete-index.md b/docs/examples/databases/delete-index.md index 2ed0165..0060064 100644 --- a/docs/examples/databases/delete-index.md +++ b/docs/examples/databases/delete-index.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/delete.md b/docs/examples/databases/delete.md index e7e988a..be64e8c 100644 --- a/docs/examples/databases/delete.md +++ b/docs/examples/databases/delete.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/get-attribute.md b/docs/examples/databases/get-attribute.md index a717552..dcdb0a6 100644 --- a/docs/examples/databases/get-attribute.md +++ b/docs/examples/databases/get-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/get-collection.md b/docs/examples/databases/get-collection.md index f63298e..0833b4f 100644 --- a/docs/examples/databases/get-collection.md +++ b/docs/examples/databases/get-collection.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/get-document.md b/docs/examples/databases/get-document.md index acdc25d..aff5008 100644 --- a/docs/examples/databases/get-document.md +++ b/docs/examples/databases/get-document.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/databases/get-index.md b/docs/examples/databases/get-index.md index ca5a995..6971683 100644 --- a/docs/examples/databases/get-index.md +++ b/docs/examples/databases/get-index.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/get.md b/docs/examples/databases/get.md index deadf6a..c8191a3 100644 --- a/docs/examples/databases/get.md +++ b/docs/examples/databases/get.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/increment-document-attribute.md b/docs/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000..d5700e0 --- /dev/null +++ b/docs/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +databases = Databases(client) + +result = databases.increment_document_attribute( + database_id = '', + collection_id = '', + document_id = '', + attribute = '', + value = None, # optional + max = None # optional +) diff --git a/docs/examples/databases/list-attributes.md b/docs/examples/databases/list-attributes.md index 245ec60..c97a5ce 100644 --- a/docs/examples/databases/list-attributes.md +++ b/docs/examples/databases/list-attributes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/list-collections.md b/docs/examples/databases/list-collections.md index ca18267..17d0a3d 100644 --- a/docs/examples/databases/list-collections.md +++ b/docs/examples/databases/list-collections.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/list-documents.md b/docs/examples/databases/list-documents.md index 41f0380..8b450cd 100644 --- a/docs/examples/databases/list-documents.md +++ b/docs/examples/databases/list-documents.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/databases/list-indexes.md b/docs/examples/databases/list-indexes.md index bf18bd1..1457151 100644 --- a/docs/examples/databases/list-indexes.md +++ b/docs/examples/databases/list-indexes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/list.md b/docs/examples/databases/list.md index 11669b3..58336c9 100644 --- a/docs/examples/databases/list.md +++ b/docs/examples/databases/list.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index c9300ea..a0f72a4 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index d929728..2e5be50 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index 96c7fb5..29bc6be 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-document.md b/docs/examples/databases/update-document.md index 7b9cce9..9ef6527 100644 --- a/docs/examples/databases/update-document.md +++ b/docs/examples/databases/update-document.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/databases/update-documents.md b/docs/examples/databases/update-documents.md new file mode 100644 index 0000000..5a50d1a --- /dev/null +++ b/docs/examples/databases/update-documents.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +databases = Databases(client) + +result = databases.update_documents( + database_id = '', + collection_id = '', + data = {}, # optional + queries = [] # optional +) diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index 5b042d4..c833789 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index caa1b4e..6186a72 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index d16b9bb..68cb7d7 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index ab0ccd6..05c6bfe 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index a2b8bad..550d3af 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 0aacc13..3b6c8e9 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index c85eb25..5b66fb0 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index 53da6ae..4a62027 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index da59776..35d2c0c 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/databases/upsert-document.md b/docs/examples/databases/upsert-document.md new file mode 100644 index 0000000..c491ea4 --- /dev/null +++ b/docs/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.upsert_document( + database_id = '', + collection_id = '', + document_id = '', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/databases/upsert-documents.md b/docs/examples/databases/upsert-documents.md new file mode 100644 index 0000000..5136d5f --- /dev/null +++ b/docs/examples/databases/upsert-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +databases = Databases(client) + +result = databases.upsert_documents( + database_id = '', + collection_id = '', + documents = [] +) diff --git a/docs/examples/functions/create-deployment.md b/docs/examples/functions/create-deployment.md index c86fdf6..0774005 100644 --- a/docs/examples/functions/create-deployment.md +++ b/docs/examples/functions/create-deployment.md @@ -3,7 +3,7 @@ from appwrite.services.functions import Functions from appwrite.input_file import InputFile client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/create-build.md b/docs/examples/functions/create-duplicate-deployment.md similarity index 73% rename from docs/examples/functions/create-build.md rename to docs/examples/functions/create-duplicate-deployment.md index ce2ffb7..79315e4 100644 --- a/docs/examples/functions/create-build.md +++ b/docs/examples/functions/create-duplicate-deployment.md @@ -2,13 +2,13 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key functions = Functions(client) -result = functions.create_build( +result = functions.create_duplicate_deployment( function_id = '', deployment_id = '', build_id = '' # optional diff --git a/docs/examples/functions/create-execution.md b/docs/examples/functions/create-execution.md index cb3fddd..b41c7e3 100644 --- a/docs/examples/functions/create-execution.md +++ b/docs/examples/functions/create-execution.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/functions/create-template-deployment.md b/docs/examples/functions/create-template-deployment.md new file mode 100644 index 0000000..6083cc1 --- /dev/null +++ b/docs/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +functions = Functions(client) + +result = functions.create_template_deployment( + function_id = '', + repository = '', + owner = '', + root_directory = '', + version = '', + activate = False # optional +) diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index 101ecdf..2089830 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key @@ -11,5 +11,6 @@ functions = Functions(client) result = functions.create_variable( function_id = '', key = '', - value = '' + value = '', + secret = False # optional ) diff --git a/docs/examples/functions/create-vcs-deployment.md b/docs/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000..4004bae --- /dev/null +++ b/docs/examples/functions/create-vcs-deployment.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.enums import VCSDeploymentType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +functions = Functions(client) + +result = functions.create_vcs_deployment( + function_id = '', + type = VCSDeploymentType.BRANCH, + reference = '', + activate = False # optional +) diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index f10a953..8758e27 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -3,7 +3,7 @@ from appwrite.services.functions import Functions from appwrite.enums import client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key @@ -27,9 +27,5 @@ result = functions.create( provider_branch = '', # optional provider_silent_mode = False, # optional provider_root_directory = '', # optional - template_repository = '', # optional - template_owner = '', # optional - template_root_directory = '', # optional - template_version = '', # optional specification = '' # optional ) diff --git a/docs/examples/functions/delete-deployment.md b/docs/examples/functions/delete-deployment.md index f98bd60..f874b2d 100644 --- a/docs/examples/functions/delete-deployment.md +++ b/docs/examples/functions/delete-deployment.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/delete-execution.md b/docs/examples/functions/delete-execution.md index b723fd6..df7ce7c 100644 --- a/docs/examples/functions/delete-execution.md +++ b/docs/examples/functions/delete-execution.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/delete-variable.md b/docs/examples/functions/delete-variable.md index e17afed..a6e3dc8 100644 --- a/docs/examples/functions/delete-variable.md +++ b/docs/examples/functions/delete-variable.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/delete.md b/docs/examples/functions/delete.md index a34d476..ed2fef7 100644 --- a/docs/examples/functions/delete.md +++ b/docs/examples/functions/delete.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/get-deployment-download.md b/docs/examples/functions/get-deployment-download.md index 90f029a..1b0673c 100644 --- a/docs/examples/functions/get-deployment-download.md +++ b/docs/examples/functions/get-deployment-download.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key @@ -10,5 +10,6 @@ functions = Functions(client) result = functions.get_deployment_download( function_id = '', - deployment_id = '' + deployment_id = '', + type = DeploymentDownloadType.SOURCE # optional ) diff --git a/docs/examples/functions/get-deployment.md b/docs/examples/functions/get-deployment.md index 0617b04..59a1374 100644 --- a/docs/examples/functions/get-deployment.md +++ b/docs/examples/functions/get-deployment.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/get-execution.md b/docs/examples/functions/get-execution.md index 0a9a347..a299f35 100644 --- a/docs/examples/functions/get-execution.md +++ b/docs/examples/functions/get-execution.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/functions/get-variable.md b/docs/examples/functions/get-variable.md index 174c8b2..629948e 100644 --- a/docs/examples/functions/get-variable.md +++ b/docs/examples/functions/get-variable.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/get.md b/docs/examples/functions/get.md index a463fa6..eeab5a5 100644 --- a/docs/examples/functions/get.md +++ b/docs/examples/functions/get.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/list-deployments.md b/docs/examples/functions/list-deployments.md index 4d8feea..4eb92f6 100644 --- a/docs/examples/functions/list-deployments.md +++ b/docs/examples/functions/list-deployments.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/list-executions.md b/docs/examples/functions/list-executions.md index 293bab0..300fc0e 100644 --- a/docs/examples/functions/list-executions.md +++ b/docs/examples/functions/list-executions.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with @@ -10,6 +10,5 @@ functions = Functions(client) result = functions.list_executions( function_id = '', - queries = [], # optional - search = '' # optional + queries = [] # optional ) diff --git a/docs/examples/functions/list-runtimes.md b/docs/examples/functions/list-runtimes.md index b624733..9c89a36 100644 --- a/docs/examples/functions/list-runtimes.md +++ b/docs/examples/functions/list-runtimes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/list-specifications.md b/docs/examples/functions/list-specifications.md index 5e1ec7f..d7d0036 100644 --- a/docs/examples/functions/list-specifications.md +++ b/docs/examples/functions/list-specifications.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/list-variables.md b/docs/examples/functions/list-variables.md index ee1a516..ebc19c5 100644 --- a/docs/examples/functions/list-variables.md +++ b/docs/examples/functions/list-variables.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/list.md b/docs/examples/functions/list.md index 0b5f18d..b1d696d 100644 --- a/docs/examples/functions/list.md +++ b/docs/examples/functions/list.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/functions/update-deployment-build.md b/docs/examples/functions/update-deployment-status.md similarity index 72% rename from docs/examples/functions/update-deployment-build.md rename to docs/examples/functions/update-deployment-status.md index c69cd7c..6c6a8bf 100644 --- a/docs/examples/functions/update-deployment-build.md +++ b/docs/examples/functions/update-deployment-status.md @@ -2,13 +2,13 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key functions = Functions(client) -result = functions.update_deployment_build( +result = functions.update_deployment_status( function_id = '', deployment_id = '' ) diff --git a/docs/examples/functions/update-deployment.md b/docs/examples/functions/update-function-deployment.md similarity index 71% rename from docs/examples/functions/update-deployment.md rename to docs/examples/functions/update-function-deployment.md index 0f4c96e..da14309 100644 --- a/docs/examples/functions/update-deployment.md +++ b/docs/examples/functions/update-function-deployment.md @@ -2,13 +2,13 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key functions = Functions(client) -result = functions.update_deployment( +result = functions.update_function_deployment( function_id = '', deployment_id = '' ) diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index bcab368..f8bcc03 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key @@ -12,5 +12,6 @@ result = functions.update_variable( function_id = '', variable_id = '', key = '', - value = '' # optional + value = '', # optional + secret = False # optional ) diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index a728241..64ee39b 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.functions import Functions client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md index e05f602..189892a 100644 --- a/docs/examples/graphql/mutation.md +++ b/docs/examples/graphql/mutation.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.graphql import Graphql client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md index c8f3c78..585a502 100644 --- a/docs/examples/graphql/query.md +++ b/docs/examples/graphql/query.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.graphql import Graphql client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-antivirus.md b/docs/examples/health/get-antivirus.md index 7bc0475..2b62147 100644 --- a/docs/examples/health/get-antivirus.md +++ b/docs/examples/health/get-antivirus.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-cache.md b/docs/examples/health/get-cache.md index 7e69825..595c4bf 100644 --- a/docs/examples/health/get-cache.md +++ b/docs/examples/health/get-cache.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-certificate.md b/docs/examples/health/get-certificate.md index f6a713e..5b3e2c0 100644 --- a/docs/examples/health/get-certificate.md +++ b/docs/examples/health/get-certificate.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-d-b.md b/docs/examples/health/get-d-b.md index a23a073..47c7bd8 100644 --- a/docs/examples/health/get-d-b.md +++ b/docs/examples/health/get-d-b.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-failed-jobs.md b/docs/examples/health/get-failed-jobs.md index d0fe64f..5362a2d 100644 --- a/docs/examples/health/get-failed-jobs.md +++ b/docs/examples/health/get-failed-jobs.md @@ -3,7 +3,7 @@ from appwrite.services.health import Health from appwrite.enums import client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-pub-sub.md b/docs/examples/health/get-pub-sub.md index 109b288..e5115d0 100644 --- a/docs/examples/health/get-pub-sub.md +++ b/docs/examples/health/get-pub-sub.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-builds.md b/docs/examples/health/get-queue-builds.md index b1d4d62..18ed8e3 100644 --- a/docs/examples/health/get-queue-builds.md +++ b/docs/examples/health/get-queue-builds.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-certificates.md b/docs/examples/health/get-queue-certificates.md index 99f52b8..b0a29e2 100644 --- a/docs/examples/health/get-queue-certificates.md +++ b/docs/examples/health/get-queue-certificates.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md index 7d5e5a0..491d1f7 100644 --- a/docs/examples/health/get-queue-databases.md +++ b/docs/examples/health/get-queue-databases.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md index d677af5..fa860c6 100644 --- a/docs/examples/health/get-queue-deletes.md +++ b/docs/examples/health/get-queue-deletes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-functions.md b/docs/examples/health/get-queue-functions.md index 3ffc4b8..d4ca938 100644 --- a/docs/examples/health/get-queue-functions.md +++ b/docs/examples/health/get-queue-functions.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-logs.md b/docs/examples/health/get-queue-logs.md index 0cb6417..1479f03 100644 --- a/docs/examples/health/get-queue-logs.md +++ b/docs/examples/health/get-queue-logs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md index 97a501c..6835efe 100644 --- a/docs/examples/health/get-queue-mails.md +++ b/docs/examples/health/get-queue-mails.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md index ea93eab..34cbad2 100644 --- a/docs/examples/health/get-queue-messaging.md +++ b/docs/examples/health/get-queue-messaging.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md index 09e35df..019db4e 100644 --- a/docs/examples/health/get-queue-migrations.md +++ b/docs/examples/health/get-queue-migrations.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-stats-resources.md b/docs/examples/health/get-queue-stats-resources.md index 3b09342..92aebc3 100644 --- a/docs/examples/health/get-queue-stats-resources.md +++ b/docs/examples/health/get-queue-stats-resources.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-usage.md b/docs/examples/health/get-queue-usage.md index dbee75f..266ca82 100644 --- a/docs/examples/health/get-queue-usage.md +++ b/docs/examples/health/get-queue-usage.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-queue-webhooks.md b/docs/examples/health/get-queue-webhooks.md index 1072a20..df5e2d5 100644 --- a/docs/examples/health/get-queue-webhooks.md +++ b/docs/examples/health/get-queue-webhooks.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-storage-local.md b/docs/examples/health/get-storage-local.md index d3b94b2..7d2ea44 100644 --- a/docs/examples/health/get-storage-local.md +++ b/docs/examples/health/get-storage-local.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-storage.md b/docs/examples/health/get-storage.md index 65af2f9..821d9f3 100644 --- a/docs/examples/health/get-storage.md +++ b/docs/examples/health/get-storage.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get-time.md b/docs/examples/health/get-time.md index d63beb9..907e964 100644 --- a/docs/examples/health/get-time.md +++ b/docs/examples/health/get-time.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/health/get.md b/docs/examples/health/get.md index f5c494e..c544fcc 100644 --- a/docs/examples/health/get.md +++ b/docs/examples/health/get.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.health import Health client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/locale/get.md b/docs/examples/locale/get.md index a44f497..6f2a877 100644 --- a/docs/examples/locale/get.md +++ b/docs/examples/locale/get.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.locale import Locale client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/locale/list-codes.md b/docs/examples/locale/list-codes.md index 12cd12e..5f3e501 100644 --- a/docs/examples/locale/list-codes.md +++ b/docs/examples/locale/list-codes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.locale import Locale client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md index ea4ac53..0aead81 100644 --- a/docs/examples/locale/list-continents.md +++ b/docs/examples/locale/list-continents.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.locale import Locale client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/locale/list-countries-e-u.md b/docs/examples/locale/list-countries-e-u.md index 7fb6aaa..f88e331 100644 --- a/docs/examples/locale/list-countries-e-u.md +++ b/docs/examples/locale/list-countries-e-u.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.locale import Locale client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md index aafdb3d..b1fdc1a 100644 --- a/docs/examples/locale/list-countries-phones.md +++ b/docs/examples/locale/list-countries-phones.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.locale import Locale client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md index a2f1ec4..0c5b23c 100644 --- a/docs/examples/locale/list-countries.md +++ b/docs/examples/locale/list-countries.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.locale import Locale client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md index 39267c6..20009d6 100644 --- a/docs/examples/locale/list-currencies.md +++ b/docs/examples/locale/list-currencies.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.locale import Locale client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md index 6dec1b9..1962a83 100644 --- a/docs/examples/locale/list-languages.md +++ b/docs/examples/locale/list-languages.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.locale import Locale client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/messaging/create-apns-provider.md b/docs/examples/messaging/create-apns-provider.md index 700e909..b57fa00 100644 --- a/docs/examples/messaging/create-apns-provider.md +++ b/docs/examples/messaging/create-apns-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-email.md b/docs/examples/messaging/create-email.md index 92353e2..8b4c9d2 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/examples/messaging/create-email.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-fcm-provider.md b/docs/examples/messaging/create-fcm-provider.md index d13ba02..9c40eb7 100644 --- a/docs/examples/messaging/create-fcm-provider.md +++ b/docs/examples/messaging/create-fcm-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-mailgun-provider.md b/docs/examples/messaging/create-mailgun-provider.md index 8389971..6703f6f 100644 --- a/docs/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/messaging/create-mailgun-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-msg91provider.md b/docs/examples/messaging/create-msg91provider.md index 117c46e..9315dcd 100644 --- a/docs/examples/messaging/create-msg91provider.md +++ b/docs/examples/messaging/create-msg91provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-push.md b/docs/examples/messaging/create-push.md index d405185..8671b56 100644 --- a/docs/examples/messaging/create-push.md +++ b/docs/examples/messaging/create-push.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-sendgrid-provider.md b/docs/examples/messaging/create-sendgrid-provider.md index 5d20cde..46ff54f 100644 --- a/docs/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/messaging/create-sendgrid-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-sms.md b/docs/examples/messaging/create-sms.md index c7e66d8..d1c7b49 100644 --- a/docs/examples/messaging/create-sms.md +++ b/docs/examples/messaging/create-sms.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-smtp-provider.md b/docs/examples/messaging/create-smtp-provider.md index 85c5823..99914f0 100644 --- a/docs/examples/messaging/create-smtp-provider.md +++ b/docs/examples/messaging/create-smtp-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-subscriber.md b/docs/examples/messaging/create-subscriber.md index cb8f4f7..bc0c892 100644 --- a/docs/examples/messaging/create-subscriber.md +++ b/docs/examples/messaging/create-subscriber.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_jwt('') # Your secret JSON Web Token diff --git a/docs/examples/messaging/create-telesign-provider.md b/docs/examples/messaging/create-telesign-provider.md index b602213..aff09fe 100644 --- a/docs/examples/messaging/create-telesign-provider.md +++ b/docs/examples/messaging/create-telesign-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-textmagic-provider.md b/docs/examples/messaging/create-textmagic-provider.md index 03287e8..46ded71 100644 --- a/docs/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/messaging/create-textmagic-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index 4dd16da..c1cb465 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/examples/messaging/create-topic.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-twilio-provider.md b/docs/examples/messaging/create-twilio-provider.md index 524348f..4438563 100644 --- a/docs/examples/messaging/create-twilio-provider.md +++ b/docs/examples/messaging/create-twilio-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/create-vonage-provider.md b/docs/examples/messaging/create-vonage-provider.md index 68416bd..6ffded5 100644 --- a/docs/examples/messaging/create-vonage-provider.md +++ b/docs/examples/messaging/create-vonage-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/delete-provider.md b/docs/examples/messaging/delete-provider.md index 2a1840d..649e504 100644 --- a/docs/examples/messaging/delete-provider.md +++ b/docs/examples/messaging/delete-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/delete-subscriber.md b/docs/examples/messaging/delete-subscriber.md index 94085ef..c012a9a 100644 --- a/docs/examples/messaging/delete-subscriber.md +++ b/docs/examples/messaging/delete-subscriber.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_jwt('') # Your secret JSON Web Token diff --git a/docs/examples/messaging/delete-topic.md b/docs/examples/messaging/delete-topic.md index 1c2f563..76f9093 100644 --- a/docs/examples/messaging/delete-topic.md +++ b/docs/examples/messaging/delete-topic.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/delete.md b/docs/examples/messaging/delete.md index aee928a..0153ac9 100644 --- a/docs/examples/messaging/delete.md +++ b/docs/examples/messaging/delete.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/get-message.md b/docs/examples/messaging/get-message.md index 9e32d80..3fadcff 100644 --- a/docs/examples/messaging/get-message.md +++ b/docs/examples/messaging/get-message.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/get-provider.md b/docs/examples/messaging/get-provider.md index 6bc85f2..58e6228 100644 --- a/docs/examples/messaging/get-provider.md +++ b/docs/examples/messaging/get-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/get-subscriber.md b/docs/examples/messaging/get-subscriber.md index 43185d7..ca997f2 100644 --- a/docs/examples/messaging/get-subscriber.md +++ b/docs/examples/messaging/get-subscriber.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/get-topic.md b/docs/examples/messaging/get-topic.md index dea6cbf..c238a98 100644 --- a/docs/examples/messaging/get-topic.md +++ b/docs/examples/messaging/get-topic.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/list-message-logs.md b/docs/examples/messaging/list-message-logs.md index 1c2ab0b..f28c3e5 100644 --- a/docs/examples/messaging/list-message-logs.md +++ b/docs/examples/messaging/list-message-logs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/list-messages.md b/docs/examples/messaging/list-messages.md index 8457f99..211649d 100644 --- a/docs/examples/messaging/list-messages.md +++ b/docs/examples/messaging/list-messages.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/list-provider-logs.md b/docs/examples/messaging/list-provider-logs.md index c8544fa..da87e59 100644 --- a/docs/examples/messaging/list-provider-logs.md +++ b/docs/examples/messaging/list-provider-logs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/list-providers.md b/docs/examples/messaging/list-providers.md index 258e7cd..03e5c4e 100644 --- a/docs/examples/messaging/list-providers.md +++ b/docs/examples/messaging/list-providers.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/list-subscriber-logs.md b/docs/examples/messaging/list-subscriber-logs.md index d2049bd..df8ec72 100644 --- a/docs/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/messaging/list-subscriber-logs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/list-subscribers.md b/docs/examples/messaging/list-subscribers.md index ba9e09d..f949b40 100644 --- a/docs/examples/messaging/list-subscribers.md +++ b/docs/examples/messaging/list-subscribers.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/list-targets.md b/docs/examples/messaging/list-targets.md index b941ccb..786ee42 100644 --- a/docs/examples/messaging/list-targets.md +++ b/docs/examples/messaging/list-targets.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/list-topic-logs.md b/docs/examples/messaging/list-topic-logs.md index 57ba7f8..f8a3995 100644 --- a/docs/examples/messaging/list-topic-logs.md +++ b/docs/examples/messaging/list-topic-logs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/list-topics.md b/docs/examples/messaging/list-topics.md index cb21567..1c2cefc 100644 --- a/docs/examples/messaging/list-topics.md +++ b/docs/examples/messaging/list-topics.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-apns-provider.md b/docs/examples/messaging/update-apns-provider.md index 3f0205d..f695b61 100644 --- a/docs/examples/messaging/update-apns-provider.md +++ b/docs/examples/messaging/update-apns-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-email.md b/docs/examples/messaging/update-email.md index b8f9d71..5731d5f 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-fcm-provider.md b/docs/examples/messaging/update-fcm-provider.md index 862e579..0119d71 100644 --- a/docs/examples/messaging/update-fcm-provider.md +++ b/docs/examples/messaging/update-fcm-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-mailgun-provider.md b/docs/examples/messaging/update-mailgun-provider.md index aa1d4e9..039475f 100644 --- a/docs/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/messaging/update-mailgun-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-msg91provider.md b/docs/examples/messaging/update-msg91provider.md index 2d4efdb..c5bd057 100644 --- a/docs/examples/messaging/update-msg91provider.md +++ b/docs/examples/messaging/update-msg91provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-push.md b/docs/examples/messaging/update-push.md index 1266353..e3bb02e 100644 --- a/docs/examples/messaging/update-push.md +++ b/docs/examples/messaging/update-push.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-sendgrid-provider.md b/docs/examples/messaging/update-sendgrid-provider.md index e528bd5..fc0a44d 100644 --- a/docs/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/messaging/update-sendgrid-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-sms.md b/docs/examples/messaging/update-sms.md index 7cb0087..2eec4e2 100644 --- a/docs/examples/messaging/update-sms.md +++ b/docs/examples/messaging/update-sms.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-smtp-provider.md b/docs/examples/messaging/update-smtp-provider.md index 2d798d4..80019aa 100644 --- a/docs/examples/messaging/update-smtp-provider.md +++ b/docs/examples/messaging/update-smtp-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-telesign-provider.md b/docs/examples/messaging/update-telesign-provider.md index 91de1f1..193a26f 100644 --- a/docs/examples/messaging/update-telesign-provider.md +++ b/docs/examples/messaging/update-telesign-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-textmagic-provider.md b/docs/examples/messaging/update-textmagic-provider.md index c303104..159f954 100644 --- a/docs/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/messaging/update-textmagic-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index 160ac26..721f160 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-twilio-provider.md b/docs/examples/messaging/update-twilio-provider.md index 865fcb5..b80c55b 100644 --- a/docs/examples/messaging/update-twilio-provider.md +++ b/docs/examples/messaging/update-twilio-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/messaging/update-vonage-provider.md b/docs/examples/messaging/update-vonage-provider.md index 8e01128..b25f416 100644 --- a/docs/examples/messaging/update-vonage-provider.md +++ b/docs/examples/messaging/update-vonage-provider.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.messaging import Messaging client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/sites/create-deployment.md b/docs/examples/sites/create-deployment.md new file mode 100644 index 0000000..de6472c --- /dev/null +++ b/docs/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.create_deployment( + site_id = '', + code = InputFile.from_path('file.png'), + activate = False, + install_command = '', # optional + build_command = '', # optional + output_directory = '' # optional +) diff --git a/docs/examples/sites/create-duplicate-deployment.md b/docs/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000..d79ab9d --- /dev/null +++ b/docs/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.create_duplicate_deployment( + site_id = '', + deployment_id = '' +) diff --git a/docs/examples/sites/create-template-deployment.md b/docs/examples/sites/create-template-deployment.md new file mode 100644 index 0000000..ac05f9e --- /dev/null +++ b/docs/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.create_template_deployment( + site_id = '', + repository = '', + owner = '', + root_directory = '', + version = '', + activate = False # optional +) diff --git a/docs/examples/sites/create-variable.md b/docs/examples/sites/create-variable.md new file mode 100644 index 0000000..739beff --- /dev/null +++ b/docs/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.create_variable( + site_id = '', + key = '', + value = '', + secret = False # optional +) diff --git a/docs/examples/sites/create-vcs-deployment.md b/docs/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000..089e6c8 --- /dev/null +++ b/docs/examples/sites/create-vcs-deployment.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import VCSDeploymentType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.create_vcs_deployment( + site_id = '', + type = VCSDeploymentType.BRANCH, + reference = '', + activate = False # optional +) diff --git a/docs/examples/sites/create.md b/docs/examples/sites/create.md new file mode 100644 index 0000000..4950cd2 --- /dev/null +++ b/docs/examples/sites/create.md @@ -0,0 +1,32 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import +from appwrite.enums import + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.create( + site_id = '', + name = '', + framework = .ANALOG, + build_runtime = .NODE_14_5, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '', # optional + build_command = '', # optional + output_directory = '', # optional + adapter = .STATIC, # optional + installation_id = '', # optional + fallback_file = '', # optional + provider_repository_id = '', # optional + provider_branch = '', # optional + provider_silent_mode = False, # optional + provider_root_directory = '', # optional + specification = '' # optional +) diff --git a/docs/examples/sites/delete-deployment.md b/docs/examples/sites/delete-deployment.md new file mode 100644 index 0000000..029730a --- /dev/null +++ b/docs/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.delete_deployment( + site_id = '', + deployment_id = '' +) diff --git a/docs/examples/sites/delete-log.md b/docs/examples/sites/delete-log.md new file mode 100644 index 0000000..0b516e6 --- /dev/null +++ b/docs/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.delete_log( + site_id = '', + log_id = '' +) diff --git a/docs/examples/sites/delete-variable.md b/docs/examples/sites/delete-variable.md new file mode 100644 index 0000000..c078813 --- /dev/null +++ b/docs/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.delete_variable( + site_id = '', + variable_id = '' +) diff --git a/docs/examples/sites/delete.md b/docs/examples/sites/delete.md new file mode 100644 index 0000000..60670e6 --- /dev/null +++ b/docs/examples/sites/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.delete( + site_id = '' +) diff --git a/docs/examples/sites/get-deployment-download.md b/docs/examples/sites/get-deployment-download.md new file mode 100644 index 0000000..d6af564 --- /dev/null +++ b/docs/examples/sites/get-deployment-download.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.get_deployment_download( + site_id = '', + deployment_id = '', + type = DeploymentDownloadType.SOURCE # optional +) diff --git a/docs/examples/sites/get-deployment.md b/docs/examples/sites/get-deployment.md new file mode 100644 index 0000000..c4ee1de --- /dev/null +++ b/docs/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.get_deployment( + site_id = '', + deployment_id = '' +) diff --git a/docs/examples/sites/get-log.md b/docs/examples/sites/get-log.md new file mode 100644 index 0000000..ae5d8ac --- /dev/null +++ b/docs/examples/sites/get-log.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.get_log( + site_id = '', + log_id = '' +) diff --git a/docs/examples/sites/get-variable.md b/docs/examples/sites/get-variable.md new file mode 100644 index 0000000..7f5f0f6 --- /dev/null +++ b/docs/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.get_variable( + site_id = '', + variable_id = '' +) diff --git a/docs/examples/sites/get.md b/docs/examples/sites/get.md new file mode 100644 index 0000000..f9532a0 --- /dev/null +++ b/docs/examples/sites/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.get( + site_id = '' +) diff --git a/docs/examples/sites/list-deployments.md b/docs/examples/sites/list-deployments.md new file mode 100644 index 0000000..15ec24d --- /dev/null +++ b/docs/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.list_deployments( + site_id = '', + queries = [], # optional + search = '' # optional +) diff --git a/docs/examples/sites/list-frameworks.md b/docs/examples/sites/list-frameworks.md new file mode 100644 index 0000000..6e37646 --- /dev/null +++ b/docs/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.list_frameworks() diff --git a/docs/examples/sites/list-logs.md b/docs/examples/sites/list-logs.md new file mode 100644 index 0000000..d3a9a19 --- /dev/null +++ b/docs/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.list_logs( + site_id = '', + queries = [] # optional +) diff --git a/docs/examples/sites/list-specifications.md b/docs/examples/sites/list-specifications.md new file mode 100644 index 0000000..93b713c --- /dev/null +++ b/docs/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.list_specifications() diff --git a/docs/examples/sites/list-variables.md b/docs/examples/sites/list-variables.md new file mode 100644 index 0000000..5ff78e6 --- /dev/null +++ b/docs/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.list_variables( + site_id = '' +) diff --git a/docs/examples/sites/list.md b/docs/examples/sites/list.md new file mode 100644 index 0000000..1b344e1 --- /dev/null +++ b/docs/examples/sites/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.list( + queries = [], # optional + search = '' # optional +) diff --git a/docs/examples/sites/update-deployment-status.md b/docs/examples/sites/update-deployment-status.md new file mode 100644 index 0000000..492ee4f --- /dev/null +++ b/docs/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.update_deployment_status( + site_id = '', + deployment_id = '' +) diff --git a/docs/examples/sites/update-site-deployment.md b/docs/examples/sites/update-site-deployment.md new file mode 100644 index 0000000..69014bb --- /dev/null +++ b/docs/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.update_site_deployment( + site_id = '', + deployment_id = '' +) diff --git a/docs/examples/sites/update-variable.md b/docs/examples/sites/update-variable.md new file mode 100644 index 0000000..973f7f2 --- /dev/null +++ b/docs/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.update_variable( + site_id = '', + variable_id = '', + key = '', + value = '', # optional + secret = False # optional +) diff --git a/docs/examples/sites/update.md b/docs/examples/sites/update.md new file mode 100644 index 0000000..7d2d286 --- /dev/null +++ b/docs/examples/sites/update.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +sites = Sites(client) + +result = sites.update( + site_id = '', + name = '', + framework = .ANALOG, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '', # optional + build_command = '', # optional + output_directory = '', # optional + build_runtime = .NODE_14_5, # optional + adapter = .STATIC, # optional + fallback_file = '', # optional + installation_id = '', # optional + provider_repository_id = '', # optional + provider_branch = '', # optional + provider_silent_mode = False, # optional + provider_root_directory = '', # optional + specification = '' # optional +) diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index 7e321f1..9672782 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/storage/create-file.md b/docs/examples/storage/create-file.md index fa0b117..6e57284 100644 --- a/docs/examples/storage/create-file.md +++ b/docs/examples/storage/create-file.md @@ -3,7 +3,7 @@ from appwrite.services.storage import Storage from appwrite.input_file import InputFile client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/storage/delete-bucket.md b/docs/examples/storage/delete-bucket.md index 8cddfb9..dd8e8eb 100644 --- a/docs/examples/storage/delete-bucket.md +++ b/docs/examples/storage/delete-bucket.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/storage/delete-file.md b/docs/examples/storage/delete-file.md index 08bba5c..17bc251 100644 --- a/docs/examples/storage/delete-file.md +++ b/docs/examples/storage/delete-file.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/storage/get-bucket.md b/docs/examples/storage/get-bucket.md index 79f903f..e5eeb4c 100644 --- a/docs/examples/storage/get-bucket.md +++ b/docs/examples/storage/get-bucket.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/storage/get-file-download.md b/docs/examples/storage/get-file-download.md index 1a82b26..411abf8 100644 --- a/docs/examples/storage/get-file-download.md +++ b/docs/examples/storage/get-file-download.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with @@ -10,5 +10,6 @@ storage = Storage(client) result = storage.get_file_download( bucket_id = '', - file_id = '' + file_id = '', + token = '' # optional ) diff --git a/docs/examples/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index 40f32f1..47e3f23 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/examples/storage/get-file-preview.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with @@ -14,12 +14,13 @@ result = storage.get_file_preview( width = 0, # optional height = 0, # optional gravity = ImageGravity.CENTER, # optional - quality = 0, # optional + quality = -1, # optional border_width = 0, # optional border_color = '', # optional border_radius = 0, # optional opacity = 0, # optional rotation = -360, # optional background = '', # optional - output = ImageFormat.JPG # optional + output = ImageFormat.JPG, # optional + token = '' # optional ) diff --git a/docs/examples/storage/get-file-view.md b/docs/examples/storage/get-file-view.md index 3947c76..85cbad7 100644 --- a/docs/examples/storage/get-file-view.md +++ b/docs/examples/storage/get-file-view.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with @@ -10,5 +10,6 @@ storage = Storage(client) result = storage.get_file_view( bucket_id = '', - file_id = '' + file_id = '', + token = '' # optional ) diff --git a/docs/examples/storage/get-file.md b/docs/examples/storage/get-file.md index 0c2d5e3..461543e 100644 --- a/docs/examples/storage/get-file.md +++ b/docs/examples/storage/get-file.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/storage/list-buckets.md b/docs/examples/storage/list-buckets.md index 88540cd..51a1ae6 100644 --- a/docs/examples/storage/list-buckets.md +++ b/docs/examples/storage/list-buckets.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/storage/list-files.md b/docs/examples/storage/list-files.md index e26ac2e..4034bd4 100644 --- a/docs/examples/storage/list-files.md +++ b/docs/examples/storage/list-files.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index 61388b0..f2e741a 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/storage/update-file.md b/docs/examples/storage/update-file.md index 336e8a0..cf1e577 100644 --- a/docs/examples/storage/update-file.md +++ b/docs/examples/storage/update-file.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index 1af9f25..cb3bf73 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/create.md b/docs/examples/teams/create.md index 7085d39..f623151 100644 --- a/docs/examples/teams/create.md +++ b/docs/examples/teams/create.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/delete-membership.md b/docs/examples/teams/delete-membership.md index adf065c..6fb2182 100644 --- a/docs/examples/teams/delete-membership.md +++ b/docs/examples/teams/delete-membership.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/delete.md b/docs/examples/teams/delete.md index 762f532..056114b 100644 --- a/docs/examples/teams/delete.md +++ b/docs/examples/teams/delete.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/get-membership.md b/docs/examples/teams/get-membership.md index 17bacff..3c028a5 100644 --- a/docs/examples/teams/get-membership.md +++ b/docs/examples/teams/get-membership.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/get-prefs.md b/docs/examples/teams/get-prefs.md index 035777d..8d64589 100644 --- a/docs/examples/teams/get-prefs.md +++ b/docs/examples/teams/get-prefs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/get.md b/docs/examples/teams/get.md index 985924e..55f172e 100644 --- a/docs/examples/teams/get.md +++ b/docs/examples/teams/get.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/list-memberships.md b/docs/examples/teams/list-memberships.md index 885a4c2..6e6f15a 100644 --- a/docs/examples/teams/list-memberships.md +++ b/docs/examples/teams/list-memberships.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/list.md b/docs/examples/teams/list.md index c92d4c9..bf91a50 100644 --- a/docs/examples/teams/list.md +++ b/docs/examples/teams/list.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index ae6e524..9c08421 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/examples/teams/update-membership-status.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/update-membership.md b/docs/examples/teams/update-membership.md index c50f345..db20c5a 100644 --- a/docs/examples/teams/update-membership.md +++ b/docs/examples/teams/update-membership.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/update-name.md b/docs/examples/teams/update-name.md index d25c8db..160b496 100644 --- a/docs/examples/teams/update-name.md +++ b/docs/examples/teams/update-name.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/teams/update-prefs.md b/docs/examples/teams/update-prefs.md index 9eca847..e82da1b 100644 --- a/docs/examples/teams/update-prefs.md +++ b/docs/examples/teams/update-prefs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.teams import Teams client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_session('') # The user session to authenticate with diff --git a/docs/examples/tokens/create-file-token.md b/docs/examples/tokens/create-file-token.md new file mode 100644 index 0000000..f835a0e --- /dev/null +++ b/docs/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +tokens = Tokens(client) + +result = tokens.create_file_token( + bucket_id = '', + file_id = '', + expire = '' # optional +) diff --git a/docs/examples/tokens/delete.md b/docs/examples/tokens/delete.md new file mode 100644 index 0000000..4761932 --- /dev/null +++ b/docs/examples/tokens/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +tokens = Tokens(client) + +result = tokens.delete( + token_id = '' +) diff --git a/docs/examples/tokens/get.md b/docs/examples/tokens/get.md new file mode 100644 index 0000000..0d6abb8 --- /dev/null +++ b/docs/examples/tokens/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +tokens = Tokens(client) + +result = tokens.get( + token_id = '' +) diff --git a/docs/examples/tokens/list.md b/docs/examples/tokens/list.md new file mode 100644 index 0000000..2694650 --- /dev/null +++ b/docs/examples/tokens/list.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +tokens = Tokens(client) + +result = tokens.list( + bucket_id = '', + file_id = '', + queries = [] # optional +) diff --git a/docs/examples/tokens/update.md b/docs/examples/tokens/update.md new file mode 100644 index 0000000..18b0444 --- /dev/null +++ b/docs/examples/tokens/update.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +tokens = Tokens(client) + +result = tokens.update( + token_id = '', + expire = '' # optional +) diff --git a/docs/examples/users/create-argon2user.md b/docs/examples/users/create-argon2user.md index 3d65496..5e95cc2 100644 --- a/docs/examples/users/create-argon2user.md +++ b/docs/examples/users/create-argon2user.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-bcrypt-user.md b/docs/examples/users/create-bcrypt-user.md index 76532a9..d3d9e21 100644 --- a/docs/examples/users/create-bcrypt-user.md +++ b/docs/examples/users/create-bcrypt-user.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-j-w-t.md b/docs/examples/users/create-j-w-t.md index 2e1fdf6..bed6c48 100644 --- a/docs/examples/users/create-j-w-t.md +++ b/docs/examples/users/create-j-w-t.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-m-d5user.md b/docs/examples/users/create-m-d5user.md index da9d471..b1cbb53 100644 --- a/docs/examples/users/create-m-d5user.md +++ b/docs/examples/users/create-m-d5user.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-mfa-recovery-codes.md b/docs/examples/users/create-mfa-recovery-codes.md index a4477b0..64a87c0 100644 --- a/docs/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/users/create-mfa-recovery-codes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-p-h-pass-user.md b/docs/examples/users/create-p-h-pass-user.md index 363be4f..33f65f4 100644 --- a/docs/examples/users/create-p-h-pass-user.md +++ b/docs/examples/users/create-p-h-pass-user.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-s-h-a-user.md b/docs/examples/users/create-s-h-a-user.md index bb78ff7..5b4c8f8 100644 --- a/docs/examples/users/create-s-h-a-user.md +++ b/docs/examples/users/create-s-h-a-user.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-scrypt-modified-user.md b/docs/examples/users/create-scrypt-modified-user.md index 1cfbcfc..9d644ce 100644 --- a/docs/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/users/create-scrypt-modified-user.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-scrypt-user.md b/docs/examples/users/create-scrypt-user.md index 2d1e72b..f442ab9 100644 --- a/docs/examples/users/create-scrypt-user.md +++ b/docs/examples/users/create-scrypt-user.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-session.md b/docs/examples/users/create-session.md index bebd46b..7e4c49f 100644 --- a/docs/examples/users/create-session.md +++ b/docs/examples/users/create-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-target.md b/docs/examples/users/create-target.md index c11c7ca..dfa64ac 100644 --- a/docs/examples/users/create-target.md +++ b/docs/examples/users/create-target.md @@ -3,7 +3,7 @@ from appwrite.services.users import Users from appwrite.enums import MessagingProviderType client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create-token.md b/docs/examples/users/create-token.md index 00a0e78..b40658c 100644 --- a/docs/examples/users/create-token.md +++ b/docs/examples/users/create-token.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/create.md b/docs/examples/users/create.md index c8dac9f..4c51a3f 100644 --- a/docs/examples/users/create.md +++ b/docs/examples/users/create.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/delete-identity.md b/docs/examples/users/delete-identity.md index 85c5b6d..412fbd3 100644 --- a/docs/examples/users/delete-identity.md +++ b/docs/examples/users/delete-identity.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/delete-mfa-authenticator.md b/docs/examples/users/delete-mfa-authenticator.md index b22d391..6472498 100644 --- a/docs/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/users/delete-mfa-authenticator.md @@ -3,7 +3,7 @@ from appwrite.services.users import Users from appwrite.enums import AuthenticatorType client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/delete-session.md b/docs/examples/users/delete-session.md index dda5713..815a96e 100644 --- a/docs/examples/users/delete-session.md +++ b/docs/examples/users/delete-session.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/delete-sessions.md b/docs/examples/users/delete-sessions.md index 268c311..2dde88f 100644 --- a/docs/examples/users/delete-sessions.md +++ b/docs/examples/users/delete-sessions.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/delete-target.md b/docs/examples/users/delete-target.md index 38cc5a9..287f5a2 100644 --- a/docs/examples/users/delete-target.md +++ b/docs/examples/users/delete-target.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/delete.md b/docs/examples/users/delete.md index 090c20f..7032b0f 100644 --- a/docs/examples/users/delete.md +++ b/docs/examples/users/delete.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/get-mfa-recovery-codes.md b/docs/examples/users/get-mfa-recovery-codes.md index ec9986c..bca43b0 100644 --- a/docs/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/users/get-mfa-recovery-codes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/get-prefs.md b/docs/examples/users/get-prefs.md index eb14d3a..ec9d363 100644 --- a/docs/examples/users/get-prefs.md +++ b/docs/examples/users/get-prefs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/get-target.md b/docs/examples/users/get-target.md index f549f08..3b80b1f 100644 --- a/docs/examples/users/get-target.md +++ b/docs/examples/users/get-target.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/get.md b/docs/examples/users/get.md index 6e018c2..267086a 100644 --- a/docs/examples/users/get.md +++ b/docs/examples/users/get.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/list-identities.md b/docs/examples/users/list-identities.md index b10c320..0fc7811 100644 --- a/docs/examples/users/list-identities.md +++ b/docs/examples/users/list-identities.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/list-logs.md b/docs/examples/users/list-logs.md index 10d8ae0..6cbbe49 100644 --- a/docs/examples/users/list-logs.md +++ b/docs/examples/users/list-logs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/list-memberships.md b/docs/examples/users/list-memberships.md index fbb3b4c..c0d2f2a 100644 --- a/docs/examples/users/list-memberships.md +++ b/docs/examples/users/list-memberships.md @@ -2,12 +2,14 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key users = Users(client) result = users.list_memberships( - user_id = '' + user_id = '', + queries = [], # optional + search = '' # optional ) diff --git a/docs/examples/users/list-mfa-factors.md b/docs/examples/users/list-mfa-factors.md index 1f40b1f..a2b5989 100644 --- a/docs/examples/users/list-mfa-factors.md +++ b/docs/examples/users/list-mfa-factors.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/list-sessions.md b/docs/examples/users/list-sessions.md index a9eead0..77b04c9 100644 --- a/docs/examples/users/list-sessions.md +++ b/docs/examples/users/list-sessions.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/list-targets.md b/docs/examples/users/list-targets.md index 4766646..14107fa 100644 --- a/docs/examples/users/list-targets.md +++ b/docs/examples/users/list-targets.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/list.md b/docs/examples/users/list.md index 4b09ca5..778f339 100644 --- a/docs/examples/users/list.md +++ b/docs/examples/users/list.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-email-verification.md b/docs/examples/users/update-email-verification.md index 4623bc3..2605861 100644 --- a/docs/examples/users/update-email-verification.md +++ b/docs/examples/users/update-email-verification.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-email.md b/docs/examples/users/update-email.md index 083715b..c4a468e 100644 --- a/docs/examples/users/update-email.md +++ b/docs/examples/users/update-email.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-labels.md b/docs/examples/users/update-labels.md index 24c5b27..b9af53a 100644 --- a/docs/examples/users/update-labels.md +++ b/docs/examples/users/update-labels.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-mfa-recovery-codes.md b/docs/examples/users/update-mfa-recovery-codes.md index d0e4da4..c0990e1 100644 --- a/docs/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/users/update-mfa-recovery-codes.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-mfa.md b/docs/examples/users/update-mfa.md index efd6730..9b35701 100644 --- a/docs/examples/users/update-mfa.md +++ b/docs/examples/users/update-mfa.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-name.md b/docs/examples/users/update-name.md index 6014ef5..1e328b4 100644 --- a/docs/examples/users/update-name.md +++ b/docs/examples/users/update-name.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-password.md b/docs/examples/users/update-password.md index 90ac15f..d104184 100644 --- a/docs/examples/users/update-password.md +++ b/docs/examples/users/update-password.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-phone-verification.md b/docs/examples/users/update-phone-verification.md index a62e6a8..1d2656c 100644 --- a/docs/examples/users/update-phone-verification.md +++ b/docs/examples/users/update-phone-verification.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-phone.md b/docs/examples/users/update-phone.md index f522730..14826bb 100644 --- a/docs/examples/users/update-phone.md +++ b/docs/examples/users/update-phone.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-prefs.md b/docs/examples/users/update-prefs.md index 64d9df3..76903b7 100644 --- a/docs/examples/users/update-prefs.md +++ b/docs/examples/users/update-prefs.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-status.md b/docs/examples/users/update-status.md index 8943ef5..49c0516 100644 --- a/docs/examples/users/update-status.md +++ b/docs/examples/users/update-status.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/docs/examples/users/update-target.md b/docs/examples/users/update-target.md index 8951385..119c5fa 100644 --- a/docs/examples/users/update-target.md +++ b/docs/examples/users/update-target.md @@ -2,7 +2,7 @@ from appwrite.client import Client from appwrite.services.users import Users client = Client() -client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key diff --git a/setup.py b/setup.py index 2534ed2..18c78cc 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ 'appwrite/encoders', 'appwrite/enums', ], - version = '10.0.0', + version = '11.1.0', 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', long_description = long_description, @@ -23,7 +23,7 @@ maintainer = 'Appwrite Team', maintainer_email = 'team@appwrite.io', url = 'https://appwrite.io/support', - download_url='https://github.com/appwrite/sdk-for-python/archive/10.0.0.tar.gz', + download_url='https://github.com/appwrite/sdk-for-python/archive/11.1.0.tar.gz', install_requires=[ 'requests', ],