diff --git a/README.md b/README.md index c16cd61..2efa745 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.0-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..b7ab483 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.0.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.0.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..9ba151b --- /dev/null +++ b/appwrite/enums/build_runtime.py @@ -0,0 +1,66 @@ +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" + 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" 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..33c6c99 100644 --- a/appwrite/enums/image_format.py +++ b/appwrite/enums/image_format.py @@ -3,7 +3,6 @@ class ImageFormat(Enum): JPG = "jpg" JPEG = "jpeg" - GIF = "gif" PNG = "png" WEBP = "webp" HEIC = "heic" diff --git a/appwrite/enums/runtime.py b/appwrite/enums/runtime.py index 1485f48..df2cb34 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,6 +33,7 @@ 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" @@ -60,3 +62,5 @@ 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" 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/avatars.py b/appwrite/services/avatars.py index 36e15d8..6ee1d4f 100644 --- a/appwrite/services/avatars.py +++ b/appwrite/services/avatars.py @@ -25,7 +25,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 ------- @@ -68,7 +68,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 ------- @@ -144,7 +144,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 ------- diff --git a/appwrite/services/databases.py b/appwrite/services/databases.py index 0335087..b798f7c 100644 --- a/appwrite/services/databases.py +++ b/appwrite/services/databases.py @@ -1760,7 +1760,6 @@ 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,6 +1810,177 @@ 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]: + """ + 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] = None) -> Dict[str, Any]: + """ + 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"') + + 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]: + """ + 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]: + """ + 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. @@ -1991,7 +2161,7 @@ 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`. @@ -2010,6 +2180,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 +2218,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', diff --git a/appwrite/services/functions.py b/appwrite/services/functions.py index a483a22..9dce425 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): @@ -17,7 +19,7 @@ def list(self, queries: List[str] = None, search: str = None) -> Dict[str, Any]: 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,7 +43,7 @@ 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. @@ -64,7 +66,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 +83,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 +126,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 +156,6 @@ def list_runtimes(self) -> Dict[str, Any]: def list_specifications(self) -> Dict[str, Any]: """ List allowed function specifications for this instance. - Returns ------- @@ -239,7 +228,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 @@ -334,16 +323,54 @@ 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. @@ -432,9 +459,9 @@ 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 +469,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 +483,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 +492,34 @@ 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 +532,51 @@ 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 +589,30 @@ 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 +620,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 +632,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 +643,13 @@ 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 +669,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 +681,13 @@ 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 +695,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,11 +720,50 @@ 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. @@ -671,8 +773,6 @@ def list_executions(self, function_id: str, queries: List[str] = None, search: s 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 +793,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) @@ -788,7 +887,6 @@ 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 ---------- @@ -855,7 +953,7 @@ 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. @@ -867,6 +965,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 +994,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', @@ -936,7 +1037,7 @@ 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. @@ -950,6 +1051,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 +1081,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', diff --git a/appwrite/services/sites.py b/appwrite/services/sites.py new file mode 100644 index 0000000..bcb7597 --- /dev/null +++ b/appwrite/services/sites.py @@ -0,0 +1,1079 @@ +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..22198eb 100644 --- a/appwrite/services/storage.py +++ b/appwrite/services/storage.py @@ -447,7 +447,7 @@ 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. @@ -457,6 +457,8 @@ def get_file_download(self, bucket_id: str, file_id: str) -> bytes: 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,11 +482,12 @@ 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. @@ -501,7 +504,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 +519,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,11 +555,12 @@ 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. @@ -564,6 +570,8 @@ def get_file_view(self, bucket_id: str, file_id: str) -> bytes: 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 +595,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..808dc2a 100644 --- a/appwrite/services/teams.py +++ b/appwrite/services/teams.py @@ -189,7 +189,7 @@ def list_memberships(self, team_id: str, queries: List[str] = None, search: str 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. diff --git a/appwrite/services/tokens.py b/appwrite/services/tokens.py new file mode 100644 index 0000000..01f1177 --- /dev/null +++ b/appwrite/services/tokens.py @@ -0,0 +1,187 @@ +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 header or request get 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..703a6bf 100644 --- a/appwrite/services/users.py +++ b/appwrite/services/users.py @@ -741,7 +741,7 @@ 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. @@ -749,6 +749,10 @@ def list_memberships(self, user_id: str) -> Dict[str, Any]: ---------- 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 +772,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) 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..1a8500b 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/examples/databases/create-document.md @@ -2,9 +2,10 @@ 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_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_session('') # The user session to authenticate with +client.set_key('') # Your secret API key +client.set_jwt('') # Your secret JSON Web Token databases = Databases(client) diff --git a/docs/examples/databases/create-documents.md b/docs/examples/databases/create-documents.md new file mode 100644 index 0000000..7c6ef24 --- /dev/null +++ b/docs/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +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_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/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/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-documents.md b/docs/examples/databases/upsert-documents.md new file mode 100644 index 0000000..9972064 --- /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 = [] # optional +) 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..5c6270f 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ 'appwrite/encoders', 'appwrite/enums', ], - version = '10.0.0', + version = '11.0.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.0.0.tar.gz', install_requires=[ 'requests', ],