From 0da3602426341837629b24701c54b3d759085ce2 Mon Sep 17 00:00:00 2001 From: Julian Strobl Date: Tue, 1 Apr 2025 18:29:32 +0200 Subject: [PATCH 01/21] fix: expire format account recovery, verification, phone and mfa closes: #4982 Signed-off-by: Julian Strobl --- app/controllers/api/account.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 64441fee5c..56d4d820de 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -3008,7 +3008,7 @@ App::post('/v1/account/recovery') throw new Exception(Exception::USER_BLOCKED); } - $expire = DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_RECOVERY); + $expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_RECOVERY)); $secret = Auth::tokenGenerator(Auth::TOKEN_LENGTH_RECOVERY); $recovery = new Document([ @@ -3259,7 +3259,7 @@ App::post('/v1/account/verification') $isPrivilegedUser = Auth::isPrivilegedUser($roles); $isAppUser = Auth::isAppUser($roles); $verificationSecret = Auth::tokenGenerator(Auth::TOKEN_LENGTH_VERIFICATION); - $expire = DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM); + $expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM)); $verification = new Document([ '$id' => ID::unique(), @@ -3498,7 +3498,7 @@ App::post('/v1/account/verification/phone') } $secret ??= Auth::codeGenerator(); - $expire = DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM); + $expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM)); $verification = new Document([ '$id' => ID::unique(), @@ -4031,7 +4031,7 @@ App::post('/v1/account/mfa/challenge') ->inject('queueForMails') ->action(function (string $factor, Response $response, Database $dbForProject, Document $user, Locale $locale, Document $project, Request $request, Event $queueForEvents, Messaging $queueForMessaging, Mail $queueForMails) { - $expire = DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM); + $expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM)); $code = Auth::codeGenerator(); $challenge = new Document([ 'userId' => $user->getId(), From 8c2235816efb2b26bbed3f3c70f01470a2596adf Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Thu, 22 May 2025 22:00:28 +0100 Subject: [PATCH 02/21] Update Appwrite description in readme --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f29be0bd61..431fbda10d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -> [Get started with Appwrite](https://apwr.dev/appcloud) -> [Join the Init kick off event 19th of May: The future of Appwrite with Founder & CEO Eldad Fux](https://www.youtube.com/watch?v=1g8tuogsp7A) +> [Get started with Appwrite](https://apwr.dev/appcloud) > [Join the Init kick off event 19th of May: The future of Appwrite with Founder & CEO Eldad Fux](https://www.youtube.com/watch?v=1g8tuogsp7A)

@@ -25,7 +24,7 @@ English | [简体中文](README-CN.md) -Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster. +Appwrite is an end-to-end platform for building Web, Mobile, Native, or Backend apps, packaged as a set of Docker microservices. It includes both a backend server and a fully integrated hosting solution for deploying static and server-side rendered frontends. Appwrite abstracts the complexity and repetitiveness required to build modern apps from scratch and allows you to build secure, full-stack applications faster. Using Appwrite, you can easily integrate your app with user authentication and multiple sign-in methods, a database for storing and querying users and team data, storage and file management, image manipulation, Cloud Functions, messaging, and [more services](https://appwrite.io/docs). @@ -50,7 +49,7 @@ Table of Contents: - [PowerShell](#powershell) - [Upgrade from an Older Version](#upgrade-from-an-older-version) - [One-Click Setups](#one-click-setups) -- [Getting Started](#getting-started) +- [Getting Started](#getting-started-1) - [Products](#products) - [SDKs](#sdks) - [Client](#client) @@ -63,7 +62,8 @@ Table of Contents: - [License](#license) ## Getting Started -The easiest way to get started with Appwrite is by [signing up for Appwrite Cloud](https://cloud.appwrite.io/). While Appwrite Cloud is in public beta, you can build with Appwrite completely free, and we won't collect you credit card information. + +The easiest way to get started with Appwrite is by [signing up for Appwrite Cloud](https://cloud.appwrite.io/). While Appwrite Cloud is in public beta, you can build with Appwrite completely free, and we won't collect you credit card information. ## Self-Hosting @@ -128,19 +128,19 @@ Choose from one of the providers below: Gitpod Logo -
Gitpod
+
Gitpod Akamai Logo -
Akamai Compute
+
Akamai Compute AWS Logo -
AWS Marketplace
+
AWS Marketplace From e9c6ab491a8f321aa620366b3c40dadc25a3724f Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Thu, 22 May 2025 22:00:59 +0100 Subject: [PATCH 03/21] Add info about Appwrite MCP to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 431fbda10d..feb53f3c45 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,7 @@ Getting started with Appwrite is as easy as creating a new project, choosing you - [**Realtime**](https://appwrite.io/docs/realtime) - Listen to real-time events for any of your Appwrite services including users, storage, functions, databases, and more. - [**Locale**](https://appwrite.io/docs/references/cloud/client-web/locale) - Track your user's location and manage your app locale-based data. - [**Avatars**](https://appwrite.io/docs/references/cloud/client-web/avatars) - Manage your users' avatars, countries' flags, browser icons, and credit card symbols. Generate QR codes from links or plaintext strings. +- [**MCP**](https://appwrite.io/docs/tooling/mcp) - Use Appwrite's Model Context Protocol (MCP) server to allow LLMs and AI tools like Claude Desktop, Cursor, and Windsurf Editor to directly interact with your Appwrite project through natural language. For the complete API documentation, visit [https://appwrite.io/docs](https://appwrite.io/docs). For more tutorials, news and announcements check out our [blog](https://medium.com/appwrite-io) and [Discord Server](https://discord.gg/GSeTUeA). From e27f1e1f6aea1624949e9cb4b815c96ece3f7c50 Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Thu, 22 May 2025 22:07:10 +0100 Subject: [PATCH 04/21] Add Sites info to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index feb53f3c45..a4894ab7db 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,7 @@ Getting started with Appwrite is as easy as creating a new project, choosing you - [**Locale**](https://appwrite.io/docs/references/cloud/client-web/locale) - Track your user's location and manage your app locale-based data. - [**Avatars**](https://appwrite.io/docs/references/cloud/client-web/avatars) - Manage your users' avatars, countries' flags, browser icons, and credit card symbols. Generate QR codes from links or plaintext strings. - [**MCP**](https://appwrite.io/docs/tooling/mcp) - Use Appwrite's Model Context Protocol (MCP) server to allow LLMs and AI tools like Claude Desktop, Cursor, and Windsurf Editor to directly interact with your Appwrite project through natural language. +- [**Sites**](https://appwrite.io/docs/products/sites) - Develop, deploy, and scale your web applications directly from Appwrite, alongside your backend. For the complete API documentation, visit [https://appwrite.io/docs](https://appwrite.io/docs). For more tutorials, news and announcements check out our [blog](https://medium.com/appwrite-io) and [Discord Server](https://discord.gg/GSeTUeA). From f306e5e8687c83a713cacb36970511267d88df8a Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Thu, 22 May 2025 22:23:23 +0100 Subject: [PATCH 05/21] Update Chinese translation of README to include hosting/MCP --- README-CN.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README-CN.md b/README-CN.md index 811fe6435c..d0d88a68ee 100644 --- a/README-CN.md +++ b/README-CN.md @@ -26,7 +26,7 @@ [**Appwrite 云公开测试版!立即注册!**](https://cloud.appwrite.io) -Appwrite 是一个基于 Docker 的端到端开发者平台,其容器化的微服务库可应用于网页端,移动端,以及后端。Appwrite 通过视觉化界面简化了从零开始编写 API 的繁琐过程,在保证软件安全的前提下为开发者创造了一个高效的开发环境。 +Appwrite 是一个基于 Docker 的端到端开发者平台,其容器化的微服务库可应用于网页端,移动端,原生应用,以及后端。它既包含后端服务器,也提供了用于部署静态和服务器端渲染前端的完全集成托管解决方案。Appwrite 通过视觉化界面简化了从零开始构建现代应用的复杂性和重复性,让您能够更快地构建安全的全栈应用。 Appwrite 可以提供给开发者用户验证,外部授权,用户数据读写检索,文件储存,图像处理,云函数计算,[等多种服务](https://appwrite.io/docs). @@ -179,6 +179,8 @@ docker run -it --rm ` - [**消息传递**](https://appwrite.io/docs/references/cloud/client-web/messaging) - 使用 Appwrite 消息传递功能通过推送通知、电子邮件和短信与用户进行通信。 - [**语言适配**](https://appwrite.io/docs/references/cloud/client-web/locale) - 根据用户所在的的国家和地区做出合适的语言适配。 - [**头像**](https://appwrite.io/docs/references/cloud/client-web/avatars) -管理用户头像、国家旗帜、浏览器图标、信用卡符号,和生成二维码。 +- [**MCP**](https://appwrite.io/docs/tooling/mcp) - 使用 Appwrite 的模型上下文协议(Model Context Protocol)服务器,允许大语言模型(LLM)和 AI 工具(如 Claude Desktop、Cursor 和 Windsurf Editor)通过自然语言直接与您的 Appwrite 项目交互。 +- [**站点**](https://appwrite.io/docs/products/sites) - 直接从 Appwrite 开发、部署和扩展您的 Web 应用程序,与您的后端一起。 如需完整的 API 界面文档,请访问 [https://appwrite.io/docs](https://appwrite.io/docs)。如需更多教程、新闻和公告,请订阅我们的 [博客](https://medium.com/appwrite-io) 和 加入我们的[Discord 社区](https://discord.gg/GSeTUeA)。 ### 开发套件 From c82d0b5dc3d245503f58bf5d663833fa5fd3ce9d Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Fri, 23 May 2025 11:18:18 +0100 Subject: [PATCH 06/21] Rename duplicate getting Started section to Installation & Setup in README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a4894ab7db..0eb044f91a 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Find out more at: [https://appwrite.io](https://appwrite.io). Table of Contents: -- [Getting Started](#getting-started) +- [Installation \& Setup](#installation--setup) - [Self-Hosting](#self-hosting) - [Unix](#unix) - [Windows](#windows) @@ -49,7 +49,7 @@ Table of Contents: - [PowerShell](#powershell) - [Upgrade from an Older Version](#upgrade-from-an-older-version) - [One-Click Setups](#one-click-setups) -- [Getting Started](#getting-started-1) +- [Getting Started](#getting-started) - [Products](#products) - [SDKs](#sdks) - [Client](#client) @@ -61,7 +61,7 @@ Table of Contents: - [Follow Us](#follow-us) - [License](#license) -## Getting Started +## Installation & Setup The easiest way to get started with Appwrite is by [signing up for Appwrite Cloud](https://cloud.appwrite.io/). While Appwrite Cloud is in public beta, you can build with Appwrite completely free, and we won't collect you credit card information. From 6b8aa1544b4eb74726ca8e58f8f92318aed582df Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Fri, 23 May 2025 11:39:16 +0100 Subject: [PATCH 07/21] Improve formatting by adding line break between links --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0eb044f91a..ad50bdb471 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -> [Get started with Appwrite](https://apwr.dev/appcloud) > [Join the Init kick off event 19th of May: The future of Appwrite with Founder & CEO Eldad Fux](https://www.youtube.com/watch?v=1g8tuogsp7A) +> [Get started with Appwrite](https://apwr.dev/appcloud) +> +> [Join the Init kick off event 19th of May: The future of Appwrite with Founder & CEO Eldad Fux](https://www.youtube.com/watch?v=1g8tuogsp7A)

From 1030053d5a93513605b0588ea5156865e5f114a7 Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Fri, 23 May 2025 11:41:11 +0100 Subject: [PATCH 08/21] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad50bdb471..be611176f7 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Table of Contents: ## Installation & Setup -The easiest way to get started with Appwrite is by [signing up for Appwrite Cloud](https://cloud.appwrite.io/). While Appwrite Cloud is in public beta, you can build with Appwrite completely free, and we won't collect you credit card information. +The easiest way to get started with Appwrite is by [signing up for Appwrite Cloud](https://cloud.appwrite.io/). While Appwrite Cloud is in public beta, you can build with Appwrite completely free, and we won't collect your credit card information. ## Self-Hosting From 848d38b75d84aabf09465c1136b129f6cc67a4f3 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 3 Jun 2025 06:59:30 +0000 Subject: [PATCH 09/21] chore: update version to 1.7.4 and add experimental feature warnings to document endpoints --- app/config/specs/open-api3-1.7.x-client.json | 27 ++++++++++++- app/config/specs/open-api3-1.7.x-console.json | 39 ++++++++++++++++--- app/config/specs/open-api3-1.7.x-server.json | 39 ++++++++++++++++--- app/config/specs/open-api3-latest-client.json | 27 ++++++++++++- .../specs/open-api3-latest-console.json | 39 ++++++++++++++++--- app/config/specs/open-api3-latest-server.json | 39 ++++++++++++++++--- app/config/specs/swagger2-1.7.x-client.json | 27 ++++++++++++- app/config/specs/swagger2-1.7.x-console.json | 39 ++++++++++++++++--- app/config/specs/swagger2-1.7.x-server.json | 39 ++++++++++++++++--- app/config/specs/swagger2-latest-client.json | 27 ++++++++++++- app/config/specs/swagger2-latest-console.json | 39 ++++++++++++++++--- app/config/specs/swagger2-latest-server.json | 39 ++++++++++++++++--- app/controllers/api/databases.php | 2 +- app/init/constants.php | 2 +- docs/references/databases/create-documents.md | 2 + docs/references/databases/delete-documents.md | 2 + docs/references/databases/upsert-document.md | 2 + docs/references/databases/upsert-documents.md | 2 + src/Appwrite/Migration/Migration.php | 1 + 19 files changed, 383 insertions(+), 50 deletions(-) diff --git a/app/config/specs/open-api3-1.7.x-client.json b/app/config/specs/open-api3-1.7.x-client.json index abeab8a56f..16d29c5f28 100644 --- a/app/config/specs/open-api3-1.7.x-client.json +++ b/app/config/specs/open-api3-1.7.x-client.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4490,6 +4490,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -4666,7 +4689,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", diff --git a/app/config/specs/open-api3-1.7.x-console.json b/app/config/specs/open-api3-1.7.x-console.json index 19ce78915c..83525478a4 100644 --- a/app/config/specs/open-api3-1.7.x-console.json +++ b/app/config/specs/open-api3-1.7.x-console.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8049,6 +8049,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -8123,12 +8146,12 @@ } }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "tags": [ "databases" ], - "description": "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.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.\n", "responses": { "200": { "description": "Documents List", @@ -8309,7 +8332,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8494,7 +8517,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", @@ -36564,6 +36587,12 @@ "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": "default", "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ diff --git a/app/config/specs/open-api3-1.7.x-server.json b/app/config/specs/open-api3-1.7.x-server.json index db615d642c..da05c6a1a7 100644 --- a/app/config/specs/open-api3-1.7.x-server.json +++ b/app/config/specs/open-api3-1.7.x-server.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7530,6 +7530,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -7606,12 +7629,12 @@ } }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "tags": [ "databases" ], - "description": "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.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.\n", "responses": { "200": { "description": "Documents List", @@ -7794,7 +7817,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -7982,7 +8005,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", @@ -26532,6 +26555,12 @@ "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": "default", "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index abeab8a56f..16d29c5f28 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4490,6 +4490,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -4666,7 +4689,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 19ce78915c..83525478a4 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8049,6 +8049,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -8123,12 +8146,12 @@ } }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "tags": [ "databases" ], - "description": "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.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.\n", "responses": { "200": { "description": "Documents List", @@ -8309,7 +8332,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8494,7 +8517,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", @@ -36564,6 +36587,12 @@ "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": "default", "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index db615d642c..da05c6a1a7 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7530,6 +7530,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -7606,12 +7629,12 @@ } }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "tags": [ "databases" ], - "description": "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.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.\n", "responses": { "200": { "description": "Documents List", @@ -7794,7 +7817,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -7982,7 +8005,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", @@ -26532,6 +26555,12 @@ "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": "default", "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ diff --git a/app/config/specs/swagger2-1.7.x-client.json b/app/config/specs/swagger2-1.7.x-client.json index 5c1b764e1e..d2bc6d2e7e 100644 --- a/app/config/specs/swagger2-1.7.x-client.json +++ b/app/config/specs/swagger2-1.7.x-client.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4636,6 +4636,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -4809,7 +4832,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", diff --git a/app/config/specs/swagger2-1.7.x-console.json b/app/config/specs/swagger2-1.7.x-console.json index 96705f3e61..249769e186 100644 --- a/app/config/specs/swagger2-1.7.x-console.json +++ b/app/config/specs/swagger2-1.7.x-console.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8178,6 +8178,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -8250,7 +8273,7 @@ ] }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "consumes": [ "application\/json" @@ -8261,7 +8284,7 @@ "tags": [ "databases" ], - "description": "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.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.\n", "responses": { "200": { "description": "Documents List", @@ -8437,7 +8460,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8612,7 +8635,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", @@ -36793,6 +36816,12 @@ "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": "default", "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true } }, "required": [ diff --git a/app/config/specs/swagger2-1.7.x-server.json b/app/config/specs/swagger2-1.7.x-server.json index c033008417..2bce9b4d7d 100644 --- a/app/config/specs/swagger2-1.7.x-server.json +++ b/app/config/specs/swagger2-1.7.x-server.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7649,6 +7649,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -7723,7 +7746,7 @@ ] }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "consumes": [ "application\/json" @@ -7734,7 +7757,7 @@ "tags": [ "databases" ], - "description": "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.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.\n", "responses": { "200": { "description": "Documents List", @@ -7912,7 +7935,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8090,7 +8113,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", @@ -26828,6 +26851,12 @@ "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": "default", "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true } }, "required": [ diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 5c1b764e1e..d2bc6d2e7e 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4636,6 +4636,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -4809,7 +4832,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 96705f3e61..249769e186 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8178,6 +8178,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -8250,7 +8273,7 @@ ] }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "consumes": [ "application\/json" @@ -8261,7 +8284,7 @@ "tags": [ "databases" ], - "description": "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.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.\n", "responses": { "200": { "description": "Documents List", @@ -8437,7 +8460,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8612,7 +8635,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", @@ -36793,6 +36816,12 @@ "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": "default", "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true } }, "required": [ diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index c033008417..2bce9b4d7d 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7649,6 +7649,29 @@ } ], "description": "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." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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." } ], "auth": { @@ -7723,7 +7746,7 @@ ] }, "put": { - "summary": "Create or update documents", + "summary": "Upsert documents", "operationId": "databasesUpsertDocuments", "consumes": [ "application\/json" @@ -7734,7 +7757,7 @@ "tags": [ "databases" ], - "description": "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.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate 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.\n", "responses": { "200": { "description": "Documents List", @@ -7912,7 +7935,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8090,7 +8113,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "200": { "description": "Document", @@ -26828,6 +26851,12 @@ "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": "default", "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true } }, "required": [ diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 4860f7a967..04194c7efa 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -4573,7 +4573,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents') }); App::put('/v1/databases/:databaseId/collections/:collectionId/documents') - ->desc('Create or update documents') + ->desc('Upsert documents') ->groups(['api', 'database']) ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) diff --git a/app/init/constants.php b/app/init/constants.php index e1b595a10f..3f929e46f6 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -38,7 +38,7 @@ const APP_RESOURCE_TOKEN_ACCESS = 24 * 60 * 60; // 24 hours const APP_FILE_ACCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours const APP_CACHE_BUSTER = 4319; -const APP_VERSION_STABLE = '1.7.3'; +const APP_VERSION_STABLE = '1.7.4'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; diff --git a/docs/references/databases/create-documents.md b/docs/references/databases/create-documents.md index a02d7c8bf1..7f60c138ea 100644 --- a/docs/references/databases/create-documents.md +++ b/docs/references/databases/create-documents.md @@ -1 +1,3 @@ +**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. + Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/delete-documents.md b/docs/references/databases/delete-documents.md index a7b05503de..b4e255c69f 100644 --- a/docs/references/databases/delete-documents.md +++ b/docs/references/databases/delete-documents.md @@ -1 +1,3 @@ +**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. + Bulk delete documents using queries, if no queries are passed then all documents are deleted. \ No newline at end of file diff --git a/docs/references/databases/upsert-document.md b/docs/references/databases/upsert-document.md index a67694cfa6..1980141d22 100644 --- a/docs/references/databases/upsert-document.md +++ b/docs/references/databases/upsert-document.md @@ -1 +1,3 @@ +**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. + Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/upsert-documents.md b/docs/references/databases/upsert-documents.md index f46254bd7b..8d9a725eff 100644 --- a/docs/references/databases/upsert-documents.md +++ b/docs/references/databases/upsert-documents.md @@ -1 +1,3 @@ +**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions. + Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index a2b1109eb3..26b0a0301f 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -88,6 +88,7 @@ abstract class Migration '1.7.1' => 'V22', '1.7.2' => 'V22', '1.7.3' => 'V22', + '1.7.4' => 'V22', ]; /** From 4d66aeed5a1e26aa9a6c1870709a906ab059ea46 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 3 Jun 2025 08:52:43 +0000 Subject: [PATCH 10/21] fix: account tests --- tests/e2e/Services/Account/AccountCustomClientTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index 452b725c11..c4684a1225 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -781,7 +781,7 @@ class AccountCustomClientTest extends Scope $this->assertEquals('Account Verification', $lastEmail['subject']); $verification = substr($lastEmail['text'], strpos($lastEmail['text'], '&secret=', 0) + 8, 256); - $expireTime = strpos($lastEmail['text'], 'expire=' . urlencode(DateTime::format(new \DateTime($response['body']['expire']))), 0); + $expireTime = strpos($lastEmail['text'], 'expire=' . urlencode((new \DateTime($response['body']['expire']))->format('Y-m-d\TH:i:s.v')), 0); $this->assertNotFalse($expireTime); $secretTest = strpos($lastEmail['text'], 'secret=' . $response['body']['secret'], 0); @@ -1084,7 +1084,7 @@ class AccountCustomClientTest extends Scope $recovery = substr($lastEmail['text'], strpos($lastEmail['text'], '&secret=', 0) + 8, 256); - $expireTime = strpos($lastEmail['text'], 'expire=' . urlencode(DateTime::format(new \DateTime($response['body']['expire']))), 0); + $expireTime = strpos($lastEmail['text'], 'expire=' . urlencode((new \DateTime($response['body']['expire']))->format('Y-m-d\TH:i:s.v')), 0); $this->assertNotFalse($expireTime); From fe86a446da5b55265de6e5949873f48bba6b42c6 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Thu, 12 Jun 2025 14:13:23 +0000 Subject: [PATCH 11/21] Update sdk generator dependency --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 7e445cd36b..328791c56f 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,7 @@ }, "require-dev": { "ext-fileinfo": "*", - "appwrite/sdk-generator": "0.40.*", + "appwrite/sdk-generator": "0.41.*", "phpunit/phpunit": "9.*", "swoole/ide-helper": "5.1.2", "phpstan/phpstan": "1.8.*", diff --git a/composer.lock b/composer.lock index 875f012fc9..a111b6639e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9f5de64d73e2ef73d796fa64f2baf232", + "content-hash": "a4b3f30b815230a17c33310f62ffb18d", "packages": [ { "name": "adhocore/jwt", @@ -4816,16 +4816,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.40.19", + "version": "0.41.6", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "05b53cf30c59fe5934d57207fefbc8ae8feb5dbf" + "reference": "bfcebb968c527e17fdf18d40b8986c83d9c18c93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/05b53cf30c59fe5934d57207fefbc8ae8feb5dbf", - "reference": "05b53cf30c59fe5934d57207fefbc8ae8feb5dbf", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/bfcebb968c527e17fdf18d40b8986c83d9c18c93", + "reference": "bfcebb968c527e17fdf18d40b8986c83d9c18c93", "shasum": "" }, "require": { @@ -4861,9 +4861,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.40.19" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.6" }, - "time": "2025-05-24T22:49:50+00:00" + "time": "2025-06-12T03:27:26+00:00" }, { "name": "doctrine/annotations", From d799891f53eec763b874f0a2eaa3694809a4714d Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Thu, 12 Jun 2025 14:23:25 +0000 Subject: [PATCH 12/21] Update Go SDK examples --- .../account/create-anonymous-session.md | 10 +++---- .../account/create-email-password-session.md | 10 +++---- .../examples/account/create-email-token.md | 10 +++---- .../examples/account/create-j-w-t.md | 10 +++---- .../account/create-magic-u-r-l-token.md | 10 +++---- .../account/create-mfa-authenticator.md | 12 ++++---- .../examples/account/create-mfa-challenge.md | 10 +++---- .../account/create-mfa-recovery-codes.md | 12 ++++---- .../examples/account/create-o-auth2token.md | 10 +++---- .../examples/account/create-phone-token.md | 10 +++---- .../account/create-phone-verification.md | 12 ++++---- .../examples/account/create-recovery.md | 12 ++++---- .../examples/account/create-session.md | 10 +++---- .../examples/account/create-verification.md | 12 ++++---- .../server-go/examples/account/create.md | 10 +++---- .../examples/account/delete-identity.md | 12 ++++---- .../account/delete-mfa-authenticator.md | 12 ++++---- .../examples/account/delete-session.md | 12 ++++---- .../examples/account/delete-sessions.md | 12 ++++---- .../account/get-mfa-recovery-codes.md | 12 ++++---- .../server-go/examples/account/get-prefs.md | 12 ++++---- .../server-go/examples/account/get-session.md | 12 ++++---- .../1.7.x/server-go/examples/account/get.md | 12 ++++---- .../examples/account/list-identities.md | 12 ++++---- .../server-go/examples/account/list-logs.md | 12 ++++---- .../examples/account/list-mfa-factors.md | 12 ++++---- .../examples/account/list-sessions.md | 12 ++++---- .../examples/account/update-email.md | 12 ++++---- .../examples/account/update-m-f-a.md | 12 ++++---- .../account/update-magic-u-r-l-session.md | 10 +++---- .../account/update-mfa-authenticator.md | 12 ++++---- .../examples/account/update-mfa-challenge.md | 12 ++++---- .../account/update-mfa-recovery-codes.md | 12 ++++---- .../server-go/examples/account/update-name.md | 12 ++++---- .../examples/account/update-password.md | 12 ++++---- .../examples/account/update-phone-session.md | 10 +++---- .../account/update-phone-verification.md | 12 ++++---- .../examples/account/update-phone.md | 12 ++++---- .../examples/account/update-prefs.md | 12 ++++---- .../examples/account/update-recovery.md | 12 ++++---- .../examples/account/update-session.md | 12 ++++---- .../examples/account/update-status.md | 12 ++++---- .../examples/account/update-verification.md | 12 ++++---- .../server-go/examples/avatars/get-browser.md | 12 ++++---- .../examples/avatars/get-credit-card.md | 12 ++++---- .../server-go/examples/avatars/get-favicon.md | 12 ++++---- .../server-go/examples/avatars/get-flag.md | 12 ++++---- .../server-go/examples/avatars/get-image.md | 12 ++++---- .../examples/avatars/get-initials.md | 12 ++++---- .../server-go/examples/avatars/get-q-r.md | 12 ++++---- .../databases/create-boolean-attribute.md | 12 ++++---- .../examples/databases/create-collection.md | 12 ++++---- .../databases/create-datetime-attribute.md | 12 ++++---- .../examples/databases/create-document.md | 14 ++++----- .../examples/databases/create-documents.md | 10 +++---- .../databases/create-email-attribute.md | 12 ++++---- .../databases/create-enum-attribute.md | 12 ++++---- .../databases/create-float-attribute.md | 12 ++++---- .../examples/databases/create-index.md | 12 ++++---- .../databases/create-integer-attribute.md | 12 ++++---- .../examples/databases/create-ip-attribute.md | 12 ++++---- .../create-relationship-attribute.md | 12 ++++---- .../databases/create-string-attribute.md | 12 ++++---- .../databases/create-url-attribute.md | 12 ++++---- .../server-go/examples/databases/create.md | 12 ++++---- .../examples/databases/delete-attribute.md | 12 ++++---- .../examples/databases/delete-collection.md | 12 ++++---- .../examples/databases/delete-document.md | 12 ++++---- .../examples/databases/delete-documents.md | 12 ++++---- .../examples/databases/delete-index.md | 12 ++++---- .../server-go/examples/databases/delete.md | 12 ++++---- .../examples/databases/get-attribute.md | 12 ++++---- .../examples/databases/get-collection.md | 12 ++++---- .../examples/databases/get-document.md | 12 ++++---- .../server-go/examples/databases/get-index.md | 12 ++++---- .../1.7.x/server-go/examples/databases/get.md | 12 ++++---- .../examples/databases/list-attributes.md | 12 ++++---- .../examples/databases/list-collections.md | 12 ++++---- .../examples/databases/list-documents.md | 12 ++++---- .../examples/databases/list-indexes.md | 12 ++++---- .../server-go/examples/databases/list.md | 12 ++++---- .../databases/update-boolean-attribute.md | 12 ++++---- .../examples/databases/update-collection.md | 12 ++++---- .../databases/update-datetime-attribute.md | 12 ++++---- .../examples/databases/update-document.md | 12 ++++---- .../examples/databases/update-documents.md | 12 ++++---- .../databases/update-email-attribute.md | 12 ++++---- .../databases/update-enum-attribute.md | 12 ++++---- .../databases/update-float-attribute.md | 12 ++++---- .../databases/update-integer-attribute.md | 12 ++++---- .../examples/databases/update-ip-attribute.md | 12 ++++---- .../update-relationship-attribute.md | 12 ++++---- .../databases/update-string-attribute.md | 12 ++++---- .../databases/update-url-attribute.md | 12 ++++---- .../server-go/examples/databases/update.md | 12 ++++---- .../examples/databases/upsert-document.md | 30 +++++++++++++++++++ .../examples/databases/upsert-documents.md | 12 ++++---- .../examples/functions/create-deployment.md | 12 ++++---- .../functions/create-duplicate-deployment.md | 12 ++++---- .../examples/functions/create-execution.md | 12 ++++---- .../functions/create-template-deployment.md | 12 ++++---- .../examples/functions/create-variable.md | 12 ++++---- .../functions/create-vcs-deployment.md | 12 ++++---- .../server-go/examples/functions/create.md | 12 ++++---- .../examples/functions/delete-deployment.md | 12 ++++---- .../examples/functions/delete-execution.md | 12 ++++---- .../examples/functions/delete-variable.md | 12 ++++---- .../server-go/examples/functions/delete.md | 12 ++++---- .../functions/get-deployment-download.md | 12 ++++---- .../examples/functions/get-deployment.md | 12 ++++---- .../examples/functions/get-execution.md | 12 ++++---- .../examples/functions/get-variable.md | 12 ++++---- .../1.7.x/server-go/examples/functions/get.md | 12 ++++---- .../examples/functions/list-deployments.md | 12 ++++---- .../examples/functions/list-executions.md | 12 ++++---- .../examples/functions/list-runtimes.md | 12 ++++---- .../examples/functions/list-specifications.md | 12 ++++---- .../examples/functions/list-variables.md | 12 ++++---- .../server-go/examples/functions/list.md | 12 ++++---- .../functions/update-deployment-status.md | 12 ++++---- .../functions/update-function-deployment.md | 12 ++++---- .../examples/functions/update-variable.md | 12 ++++---- .../server-go/examples/functions/update.md | 12 ++++---- .../server-go/examples/graphql/mutation.md | 12 ++++---- .../1.7.x/server-go/examples/graphql/query.md | 12 ++++---- .../examples/health/get-antivirus.md | 12 ++++---- .../server-go/examples/health/get-cache.md | 12 ++++---- .../examples/health/get-certificate.md | 12 ++++---- .../server-go/examples/health/get-d-b.md | 12 ++++---- .../examples/health/get-failed-jobs.md | 12 ++++---- .../server-go/examples/health/get-pub-sub.md | 12 ++++---- .../examples/health/get-queue-builds.md | 12 ++++---- .../examples/health/get-queue-certificates.md | 12 ++++---- .../examples/health/get-queue-databases.md | 12 ++++---- .../examples/health/get-queue-deletes.md | 12 ++++---- .../examples/health/get-queue-functions.md | 12 ++++---- .../examples/health/get-queue-logs.md | 12 ++++---- .../examples/health/get-queue-mails.md | 12 ++++---- .../examples/health/get-queue-messaging.md | 12 ++++---- .../examples/health/get-queue-migrations.md | 12 ++++---- .../health/get-queue-stats-resources.md | 12 ++++---- .../examples/health/get-queue-usage.md | 12 ++++---- .../examples/health/get-queue-webhooks.md | 12 ++++---- .../examples/health/get-storage-local.md | 12 ++++---- .../server-go/examples/health/get-storage.md | 12 ++++---- .../server-go/examples/health/get-time.md | 12 ++++---- .../1.7.x/server-go/examples/health/get.md | 12 ++++---- .../1.7.x/server-go/examples/locale/get.md | 12 ++++---- .../server-go/examples/locale/list-codes.md | 12 ++++---- .../examples/locale/list-continents.md | 12 ++++---- .../examples/locale/list-countries-e-u.md | 12 ++++---- .../examples/locale/list-countries-phones.md | 12 ++++---- .../examples/locale/list-countries.md | 12 ++++---- .../examples/locale/list-currencies.md | 12 ++++---- .../examples/locale/list-languages.md | 12 ++++---- .../messaging/create-apns-provider.md | 12 ++++---- .../examples/messaging/create-email.md | 12 ++++---- .../examples/messaging/create-fcm-provider.md | 12 ++++---- .../messaging/create-mailgun-provider.md | 12 ++++---- .../messaging/create-msg91provider.md | 12 ++++---- .../examples/messaging/create-push.md | 12 ++++---- .../messaging/create-sendgrid-provider.md | 12 ++++---- .../examples/messaging/create-sms.md | 12 ++++---- .../messaging/create-smtp-provider.md | 12 ++++---- .../examples/messaging/create-subscriber.md | 12 ++++---- .../messaging/create-telesign-provider.md | 12 ++++---- .../messaging/create-textmagic-provider.md | 12 ++++---- .../examples/messaging/create-topic.md | 12 ++++---- .../messaging/create-twilio-provider.md | 12 ++++---- .../messaging/create-vonage-provider.md | 12 ++++---- .../examples/messaging/delete-provider.md | 12 ++++---- .../examples/messaging/delete-subscriber.md | 12 ++++---- .../examples/messaging/delete-topic.md | 12 ++++---- .../server-go/examples/messaging/delete.md | 12 ++++---- .../examples/messaging/get-message.md | 12 ++++---- .../examples/messaging/get-provider.md | 12 ++++---- .../examples/messaging/get-subscriber.md | 12 ++++---- .../server-go/examples/messaging/get-topic.md | 12 ++++---- .../examples/messaging/list-message-logs.md | 12 ++++---- .../examples/messaging/list-messages.md | 12 ++++---- .../examples/messaging/list-provider-logs.md | 12 ++++---- .../examples/messaging/list-providers.md | 12 ++++---- .../messaging/list-subscriber-logs.md | 12 ++++---- .../examples/messaging/list-subscribers.md | 12 ++++---- .../examples/messaging/list-targets.md | 12 ++++---- .../examples/messaging/list-topic-logs.md | 12 ++++---- .../examples/messaging/list-topics.md | 12 ++++---- .../messaging/update-apns-provider.md | 12 ++++---- .../examples/messaging/update-email.md | 12 ++++---- .../examples/messaging/update-fcm-provider.md | 12 ++++---- .../messaging/update-mailgun-provider.md | 12 ++++---- .../messaging/update-msg91provider.md | 12 ++++---- .../examples/messaging/update-push.md | 12 ++++---- .../messaging/update-sendgrid-provider.md | 12 ++++---- .../examples/messaging/update-sms.md | 12 ++++---- .../messaging/update-smtp-provider.md | 12 ++++---- .../messaging/update-telesign-provider.md | 12 ++++---- .../messaging/update-textmagic-provider.md | 12 ++++---- .../examples/messaging/update-topic.md | 12 ++++---- .../messaging/update-twilio-provider.md | 12 ++++---- .../messaging/update-vonage-provider.md | 12 ++++---- .../examples/sites/create-deployment.md | 12 ++++---- .../sites/create-duplicate-deployment.md | 12 ++++---- .../sites/create-template-deployment.md | 12 ++++---- .../examples/sites/create-variable.md | 12 ++++---- .../examples/sites/create-vcs-deployment.md | 12 ++++---- .../1.7.x/server-go/examples/sites/create.md | 12 ++++---- .../examples/sites/delete-deployment.md | 12 ++++---- .../server-go/examples/sites/delete-log.md | 12 ++++---- .../examples/sites/delete-variable.md | 12 ++++---- .../1.7.x/server-go/examples/sites/delete.md | 12 ++++---- .../examples/sites/get-deployment-download.md | 12 ++++---- .../examples/sites/get-deployment.md | 12 ++++---- .../1.7.x/server-go/examples/sites/get-log.md | 12 ++++---- .../server-go/examples/sites/get-variable.md | 12 ++++---- .../1.7.x/server-go/examples/sites/get.md | 12 ++++---- .../examples/sites/list-deployments.md | 12 ++++---- .../examples/sites/list-frameworks.md | 12 ++++---- .../server-go/examples/sites/list-logs.md | 12 ++++---- .../examples/sites/list-specifications.md | 12 ++++---- .../examples/sites/list-variables.md | 12 ++++---- .../1.7.x/server-go/examples/sites/list.md | 12 ++++---- .../sites/update-deployment-status.md | 12 ++++---- .../examples/sites/update-site-deployment.md | 12 ++++---- .../examples/sites/update-variable.md | 12 ++++---- .../1.7.x/server-go/examples/sites/update.md | 12 ++++---- .../examples/storage/create-bucket.md | 12 ++++---- .../server-go/examples/storage/create-file.md | 12 ++++---- .../examples/storage/delete-bucket.md | 12 ++++---- .../server-go/examples/storage/delete-file.md | 12 ++++---- .../server-go/examples/storage/get-bucket.md | 12 ++++---- .../examples/storage/get-file-download.md | 12 ++++---- .../examples/storage/get-file-preview.md | 12 ++++---- .../examples/storage/get-file-view.md | 12 ++++---- .../server-go/examples/storage/get-file.md | 12 ++++---- .../examples/storage/list-buckets.md | 12 ++++---- .../server-go/examples/storage/list-files.md | 12 ++++---- .../examples/storage/update-bucket.md | 12 ++++---- .../server-go/examples/storage/update-file.md | 12 ++++---- .../examples/teams/create-membership.md | 12 ++++---- .../1.7.x/server-go/examples/teams/create.md | 12 ++++---- .../examples/teams/delete-membership.md | 12 ++++---- .../1.7.x/server-go/examples/teams/delete.md | 12 ++++---- .../examples/teams/get-membership.md | 12 ++++---- .../server-go/examples/teams/get-prefs.md | 12 ++++---- .../1.7.x/server-go/examples/teams/get.md | 12 ++++---- .../examples/teams/list-memberships.md | 12 ++++---- .../1.7.x/server-go/examples/teams/list.md | 12 ++++---- .../teams/update-membership-status.md | 12 ++++---- .../examples/teams/update-membership.md | 12 ++++---- .../server-go/examples/teams/update-name.md | 12 ++++---- .../server-go/examples/teams/update-prefs.md | 12 ++++---- .../examples/tokens/create-file-token.md | 12 ++++---- .../1.7.x/server-go/examples/tokens/delete.md | 12 ++++---- .../1.7.x/server-go/examples/tokens/get.md | 12 ++++---- .../1.7.x/server-go/examples/tokens/list.md | 12 ++++---- .../1.7.x/server-go/examples/tokens/update.md | 12 ++++---- .../examples/users/create-argon2user.md | 12 ++++---- .../examples/users/create-bcrypt-user.md | 12 ++++---- .../server-go/examples/users/create-j-w-t.md | 12 ++++---- .../examples/users/create-m-d5user.md | 12 ++++---- .../users/create-mfa-recovery-codes.md | 12 ++++---- .../examples/users/create-p-h-pass-user.md | 12 ++++---- .../examples/users/create-s-h-a-user.md | 12 ++++---- .../users/create-scrypt-modified-user.md | 12 ++++---- .../examples/users/create-scrypt-user.md | 12 ++++---- .../examples/users/create-session.md | 12 ++++---- .../server-go/examples/users/create-target.md | 12 ++++---- .../server-go/examples/users/create-token.md | 12 ++++---- .../1.7.x/server-go/examples/users/create.md | 12 ++++---- .../examples/users/delete-identity.md | 12 ++++---- .../users/delete-mfa-authenticator.md | 12 ++++---- .../examples/users/delete-session.md | 12 ++++---- .../examples/users/delete-sessions.md | 12 ++++---- .../server-go/examples/users/delete-target.md | 12 ++++---- .../1.7.x/server-go/examples/users/delete.md | 12 ++++---- .../examples/users/get-mfa-recovery-codes.md | 12 ++++---- .../server-go/examples/users/get-prefs.md | 12 ++++---- .../server-go/examples/users/get-target.md | 12 ++++---- .../1.7.x/server-go/examples/users/get.md | 12 ++++---- .../examples/users/list-identities.md | 12 ++++---- .../server-go/examples/users/list-logs.md | 12 ++++---- .../examples/users/list-memberships.md | 12 ++++---- .../examples/users/list-mfa-factors.md | 12 ++++---- .../server-go/examples/users/list-sessions.md | 12 ++++---- .../server-go/examples/users/list-targets.md | 12 ++++---- .../1.7.x/server-go/examples/users/list.md | 12 ++++---- .../users/update-email-verification.md | 12 ++++---- .../server-go/examples/users/update-email.md | 12 ++++---- .../server-go/examples/users/update-labels.md | 12 ++++---- .../users/update-mfa-recovery-codes.md | 12 ++++---- .../server-go/examples/users/update-mfa.md | 12 ++++---- .../server-go/examples/users/update-name.md | 12 ++++---- .../examples/users/update-password.md | 12 ++++---- .../users/update-phone-verification.md | 12 ++++---- .../server-go/examples/users/update-phone.md | 12 ++++---- .../server-go/examples/users/update-prefs.md | 12 ++++---- .../server-go/examples/users/update-status.md | 12 ++++---- .../server-go/examples/users/update-target.md | 12 ++++---- 299 files changed, 1806 insertions(+), 1776 deletions(-) create mode 100644 docs/examples/1.7.x/server-go/examples/databases/upsert-document.md diff --git a/docs/examples/1.7.x/server-go/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-go/examples/account/create-anonymous-session.md index a6b5b6a2cf..ff8aea9751 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-anonymous-session.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-anonymous-session.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateAnonymousSession( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-go/examples/account/create-email-password-session.md index d876edc7ac..18d8dbc184 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-email-password-session.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-email-password-session.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateEmailPasswordSession( "email@example.com", "password", diff --git a/docs/examples/1.7.x/server-go/examples/account/create-email-token.md b/docs/examples/1.7.x/server-go/examples/account/create-email-token.md index aa832e7bf5..c057af5b9d 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-email-token.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-email-token.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateEmailToken( "", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-go/examples/account/create-j-w-t.md index fad35ab519..665f365e20 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-j-w-t.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-j-w-t.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateJWT( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-go/examples/account/create-magic-u-r-l-token.md index 1e2090fd8e..cad88c183d 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-magic-u-r-l-token.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateMagicURLToken( "", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-go/examples/account/create-mfa-authenticator.md index 8d425404b5..336a91d944 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-mfa-authenticator.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateMfaAuthenticator( "totp", ) diff --git a/docs/examples/1.7.x/server-go/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-go/examples/account/create-mfa-challenge.md index 3ac4a3babf..4e17eb5ad9 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-mfa-challenge.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateMfaChallenge( "email", ) diff --git a/docs/examples/1.7.x/server-go/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/account/create-mfa-recovery-codes.md index 063a804f6e..714d6106a0 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-mfa-recovery-codes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateMfaRecoveryCodes( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-go/examples/account/create-o-auth2token.md index f3b6997fff..56a2acdbf1 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-o-auth2token.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-o-auth2token.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateOAuth2Token( "amazon", account.WithCreateOAuth2TokenSuccess("https://example.com"), diff --git a/docs/examples/1.7.x/server-go/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-go/examples/account/create-phone-token.md index c9e80de622..b6c2ec7db7 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-phone-token.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-phone-token.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreatePhoneToken( "", "+12065550100", diff --git a/docs/examples/1.7.x/server-go/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-go/examples/account/create-phone-verification.md index c7a6bf4bf5..699cdb222e 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-phone-verification.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-phone-verification.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreatePhoneVerification( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/create-recovery.md b/docs/examples/1.7.x/server-go/examples/account/create-recovery.md index 9d55755c37..923d2819a6 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-recovery.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-recovery.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateRecovery( "email@example.com", "https://example.com", diff --git a/docs/examples/1.7.x/server-go/examples/account/create-session.md b/docs/examples/1.7.x/server-go/examples/account/create-session.md index f93502a31f..f5949241ff 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-session.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-session.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateSession( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/account/create-verification.md b/docs/examples/1.7.x/server-go/examples/account/create-verification.md index afb98c7ec0..b3c7fd8004 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create-verification.md +++ b/docs/examples/1.7.x/server-go/examples/account/create-verification.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.CreateVerification( "https://example.com", ) diff --git a/docs/examples/1.7.x/server-go/examples/account/create.md b/docs/examples/1.7.x/server-go/examples/account/create.md index b834d47d0f..dc4fdfe8f6 100644 --- a/docs/examples/1.7.x/server-go/examples/account/create.md +++ b/docs/examples/1.7.x/server-go/examples/account/create.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.Create( "", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/account/delete-identity.md b/docs/examples/1.7.x/server-go/examples/account/delete-identity.md index 30d2534602..2155249894 100644 --- a/docs/examples/1.7.x/server-go/examples/account/delete-identity.md +++ b/docs/examples/1.7.x/server-go/examples/account/delete-identity.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.DeleteIdentity( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-go/examples/account/delete-mfa-authenticator.md index 7f3edec33d..6eb956bdec 100644 --- a/docs/examples/1.7.x/server-go/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.7.x/server-go/examples/account/delete-mfa-authenticator.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.DeleteMfaAuthenticator( "totp", ) diff --git a/docs/examples/1.7.x/server-go/examples/account/delete-session.md b/docs/examples/1.7.x/server-go/examples/account/delete-session.md index 398604ecdd..3a1a9514bb 100644 --- a/docs/examples/1.7.x/server-go/examples/account/delete-session.md +++ b/docs/examples/1.7.x/server-go/examples/account/delete-session.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.DeleteSession( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-go/examples/account/delete-sessions.md index 97eda5899a..718d149241 100644 --- a/docs/examples/1.7.x/server-go/examples/account/delete-sessions.md +++ b/docs/examples/1.7.x/server-go/examples/account/delete-sessions.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.DeleteSessions( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/account/get-mfa-recovery-codes.md index 0dd93bb765..fd07fe36d9 100644 --- a/docs/examples/1.7.x/server-go/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/1.7.x/server-go/examples/account/get-mfa-recovery-codes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.GetMfaRecoveryCodes( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/get-prefs.md b/docs/examples/1.7.x/server-go/examples/account/get-prefs.md index b7985acbd7..911b5786ce 100644 --- a/docs/examples/1.7.x/server-go/examples/account/get-prefs.md +++ b/docs/examples/1.7.x/server-go/examples/account/get-prefs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.GetPrefs( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/get-session.md b/docs/examples/1.7.x/server-go/examples/account/get-session.md index d6d1ffe05f..dc42c3c12d 100644 --- a/docs/examples/1.7.x/server-go/examples/account/get-session.md +++ b/docs/examples/1.7.x/server-go/examples/account/get-session.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.GetSession( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/account/get.md b/docs/examples/1.7.x/server-go/examples/account/get.md index 7e08024930..80fe2da7c0 100644 --- a/docs/examples/1.7.x/server-go/examples/account/get.md +++ b/docs/examples/1.7.x/server-go/examples/account/get.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.Get( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/list-identities.md b/docs/examples/1.7.x/server-go/examples/account/list-identities.md index 7a7f4bc09f..3bfa0a7b60 100644 --- a/docs/examples/1.7.x/server-go/examples/account/list-identities.md +++ b/docs/examples/1.7.x/server-go/examples/account/list-identities.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.ListIdentities( account.WithListIdentitiesQueries([]interface{}{}), ) diff --git a/docs/examples/1.7.x/server-go/examples/account/list-logs.md b/docs/examples/1.7.x/server-go/examples/account/list-logs.md index eec9ed33e0..67ee6de1c2 100644 --- a/docs/examples/1.7.x/server-go/examples/account/list-logs.md +++ b/docs/examples/1.7.x/server-go/examples/account/list-logs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.ListLogs( account.WithListLogsQueries([]interface{}{}), ) diff --git a/docs/examples/1.7.x/server-go/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-go/examples/account/list-mfa-factors.md index 4dca59fff6..26fb516fed 100644 --- a/docs/examples/1.7.x/server-go/examples/account/list-mfa-factors.md +++ b/docs/examples/1.7.x/server-go/examples/account/list-mfa-factors.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.ListMfaFactors( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/list-sessions.md b/docs/examples/1.7.x/server-go/examples/account/list-sessions.md index 9f8a5f4799..96b8c10d4c 100644 --- a/docs/examples/1.7.x/server-go/examples/account/list-sessions.md +++ b/docs/examples/1.7.x/server-go/examples/account/list-sessions.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.ListSessions( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/update-email.md b/docs/examples/1.7.x/server-go/examples/account/update-email.md index 11f98265b6..7467080416 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-email.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-email.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateEmail( "email@example.com", "password", diff --git a/docs/examples/1.7.x/server-go/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-go/examples/account/update-m-f-a.md index d3df3d4638..139eea3afd 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-m-f-a.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-m-f-a.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateMFA( false, ) diff --git a/docs/examples/1.7.x/server-go/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-go/examples/account/update-magic-u-r-l-session.md index fdc9d45c04..4cda48878b 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-magic-u-r-l-session.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateMagicURLSession( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-go/examples/account/update-mfa-authenticator.md index fb225574d4..ce4ebaffe7 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-mfa-authenticator.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateMfaAuthenticator( "totp", "", diff --git a/docs/examples/1.7.x/server-go/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-go/examples/account/update-mfa-challenge.md index 1e95a60d34..d2bb0c92ec 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-mfa-challenge.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateMfaChallenge( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/account/update-mfa-recovery-codes.md index 08feede261..9902b143f5 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-mfa-recovery-codes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateMfaRecoveryCodes( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/update-name.md b/docs/examples/1.7.x/server-go/examples/account/update-name.md index 8424a26946..972873a17a 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-name.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-name.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateName( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/account/update-password.md b/docs/examples/1.7.x/server-go/examples/account/update-password.md index 561ff0a667..aedcd0ccbc 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-password.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-password.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdatePassword( "", account.WithUpdatePasswordOldPassword("password"), diff --git a/docs/examples/1.7.x/server-go/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-go/examples/account/update-phone-session.md index 433043e439..c937d9cd0d 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-phone-session.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-phone-session.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdatePhoneSession( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-go/examples/account/update-phone-verification.md index 46602a8be8..462d98db9a 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-phone-verification.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-phone-verification.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdatePhoneVerification( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/account/update-phone.md b/docs/examples/1.7.x/server-go/examples/account/update-phone.md index d753cb21d3..163ecedd22 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-phone.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-phone.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdatePhone( "+12065550100", "password", diff --git a/docs/examples/1.7.x/server-go/examples/account/update-prefs.md b/docs/examples/1.7.x/server-go/examples/account/update-prefs.md index 0319de200a..ed566ba519 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-prefs.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-prefs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdatePrefs( map[string]interface{}{}, ) diff --git a/docs/examples/1.7.x/server-go/examples/account/update-recovery.md b/docs/examples/1.7.x/server-go/examples/account/update-recovery.md index f40414e5e8..0d7820bfb9 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-recovery.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-recovery.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateRecovery( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/account/update-session.md b/docs/examples/1.7.x/server-go/examples/account/update-session.md index 8e1725a71c..61029a7157 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-session.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-session.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateSession( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/account/update-status.md b/docs/examples/1.7.x/server-go/examples/account/update-status.md index a9a0e239b0..05f6449a72 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-status.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-status.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateStatus( ) diff --git a/docs/examples/1.7.x/server-go/examples/account/update-verification.md b/docs/examples/1.7.x/server-go/examples/account/update-verification.md index 2fd356dcf8..1c781659e4 100644 --- a/docs/examples/1.7.x/server-go/examples/account/update-verification.md +++ b/docs/examples/1.7.x/server-go/examples/account/update-verification.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := account.NewAccount(client) + service := account.New(client) response, error := service.UpdateVerification( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md index 34f3bf58f9..98f405d6dd 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := avatars.NewAvatars(client) + service := avatars.New(client) response, error := service.GetBrowser( "aa", avatars.WithGetBrowserWidth(0), diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md index 764debd877..efdfdbd5dc 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := avatars.NewAvatars(client) + service := avatars.New(client) response, error := service.GetCreditCard( "amex", avatars.WithGetCreditCardWidth(0), diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-go/examples/avatars/get-favicon.md index bdea40db2f..35ea339097 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-favicon.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-favicon.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := avatars.NewAvatars(client) + service := avatars.New(client) response, error := service.GetFavicon( "https://example.com", ) diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md index dfda1ed687..3af30f3cc3 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := avatars.NewAvatars(client) + service := avatars.New(client) response, error := service.GetFlag( "af", avatars.WithGetFlagWidth(0), diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-image.md b/docs/examples/1.7.x/server-go/examples/avatars/get-image.md index a751abb927..f4e0324c9d 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-image.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-image.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := avatars.NewAvatars(client) + service := avatars.New(client) response, error := service.GetImage( "https://example.com", avatars.WithGetImageWidth(0), diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-go/examples/avatars/get-initials.md index 21fa9282ae..a7519012e2 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-initials.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-initials.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := avatars.NewAvatars(client) + service := avatars.New(client) response, error := service.GetInitials( avatars.WithGetInitialsName(""), avatars.WithGetInitialsWidth(0), diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-go/examples/avatars/get-q-r.md index 8eeea5f6bf..edd84269e3 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-q-r.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-q-r.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := avatars.NewAvatars(client) + service := avatars.New(client) response, error := service.GetQR( "", avatars.WithGetQRSize(1), diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-boolean-attribute.md index 73e118e3b7..43b7aff721 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-boolean-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateBooleanAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-collection.md b/docs/examples/1.7.x/server-go/examples/databases/create-collection.md index 815b21d6cb..f72c4b360d 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-collection.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-collection.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateCollection( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-datetime-attribute.md index edf716911d..7d0de22c7d 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-datetime-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateDatetimeAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-document.md b/docs/examples/1.7.x/server-go/examples/databases/create-document.md index 5a5280a107..8990beaa8d 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-document.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-document.md @@ -7,14 +7,14 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("") // Your secret API key + client.WithJWT("") // Your secret JSON Web Token + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetSession("") // The user session to authenticate with - client.SetKey("") // Your secret API key - client.SetJWT("") // Your secret JSON Web Token - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateDocument( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-documents.md b/docs/examples/1.7.x/server-go/examples/databases/create-documents.md index 4199c28230..d9492df5f7 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-documents.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-documents.md @@ -7,12 +7,12 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateDocuments( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-email-attribute.md index f564b4033a..7fa28adfb0 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-email-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-email-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateEmailAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-enum-attribute.md index 0827d31e1a..4921e2120b 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-enum-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateEnumAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-float-attribute.md index a262e1d3f3..b933bab5e5 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-float-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-float-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateFloatAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-index.md b/docs/examples/1.7.x/server-go/examples/databases/create-index.md index 83e97d8e36..0513490178 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-index.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateIndex( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-integer-attribute.md index daa54f9ec6..d84771dee7 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-integer-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateIntegerAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-ip-attribute.md index 4c5c9c37c2..136a7e96e8 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-ip-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateIpAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-relationship-attribute.md index e10aee8ddd..7fa8c9fad9 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-relationship-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateRelationshipAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-string-attribute.md index e4bd63ce35..25d3c1066a 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-string-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-string-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateStringAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-url-attribute.md index 9d8b2e13f8..dd77c93207 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-url-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-url-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.CreateUrlAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/create.md b/docs/examples/1.7.x/server-go/examples/databases/create.md index 80f9f92c29..f51a5d70f3 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.Create( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/delete-attribute.md index 746dae5d0b..c34c83a6a5 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/delete-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/delete-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.DeleteAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-go/examples/databases/delete-collection.md index abf6a7ae20..01e7710c26 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/delete-collection.md +++ b/docs/examples/1.7.x/server-go/examples/databases/delete-collection.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.DeleteCollection( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete-document.md b/docs/examples/1.7.x/server-go/examples/databases/delete-document.md index e8131a73f5..1fc4092ac6 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/delete-document.md +++ b/docs/examples/1.7.x/server-go/examples/databases/delete-document.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.DeleteDocument( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete-documents.md b/docs/examples/1.7.x/server-go/examples/databases/delete-documents.md index 6527cee677..fe018b1bbf 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/delete-documents.md +++ b/docs/examples/1.7.x/server-go/examples/databases/delete-documents.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.DeleteDocuments( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete-index.md b/docs/examples/1.7.x/server-go/examples/databases/delete-index.md index 38e6bc94d0..07bbb6f80c 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/delete-index.md +++ b/docs/examples/1.7.x/server-go/examples/databases/delete-index.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.DeleteIndex( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete.md b/docs/examples/1.7.x/server-go/examples/databases/delete.md index 0e7fb0a058..60995b66f0 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/delete.md +++ b/docs/examples/1.7.x/server-go/examples/databases/delete.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.Delete( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/get-attribute.md index 64ba82e65c..560f34c018 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/get-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/get-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.GetAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/get-collection.md b/docs/examples/1.7.x/server-go/examples/databases/get-collection.md index ee166a4ff9..75de4c6882 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/get-collection.md +++ b/docs/examples/1.7.x/server-go/examples/databases/get-collection.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.GetCollection( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/get-document.md b/docs/examples/1.7.x/server-go/examples/databases/get-document.md index 657a3dcab3..8bdd26c351 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/get-document.md +++ b/docs/examples/1.7.x/server-go/examples/databases/get-document.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.GetDocument( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/get-index.md b/docs/examples/1.7.x/server-go/examples/databases/get-index.md index efc9c1f950..ef38678361 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/get-index.md +++ b/docs/examples/1.7.x/server-go/examples/databases/get-index.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.GetIndex( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/get.md b/docs/examples/1.7.x/server-go/examples/databases/get.md index b6d337111b..0d1eb87a29 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/get.md +++ b/docs/examples/1.7.x/server-go/examples/databases/get.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.Get( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-go/examples/databases/list-attributes.md index 8095b75d19..e4748c6f90 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/list-attributes.md +++ b/docs/examples/1.7.x/server-go/examples/databases/list-attributes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.ListAttributes( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/list-collections.md b/docs/examples/1.7.x/server-go/examples/databases/list-collections.md index 2303c98bde..91716dc40e 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/list-collections.md +++ b/docs/examples/1.7.x/server-go/examples/databases/list-collections.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.ListCollections( "", databases.WithListCollectionsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/databases/list-documents.md b/docs/examples/1.7.x/server-go/examples/databases/list-documents.md index 952a1b2b48..91d0408efc 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/list-documents.md +++ b/docs/examples/1.7.x/server-go/examples/databases/list-documents.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.ListDocuments( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-go/examples/databases/list-indexes.md index 8593dd71b7..a5af8d2847 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/list-indexes.md +++ b/docs/examples/1.7.x/server-go/examples/databases/list-indexes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.ListIndexes( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/list.md b/docs/examples/1.7.x/server-go/examples/databases/list.md index 798e33b6ea..f377c11df0 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/list.md +++ b/docs/examples/1.7.x/server-go/examples/databases/list.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.List( databases.WithListQueries([]interface{}{}), databases.WithListSearch(""), diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-boolean-attribute.md index 770617635d..87e16a0e01 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-boolean-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateBooleanAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-collection.md b/docs/examples/1.7.x/server-go/examples/databases/update-collection.md index 1f80eaa255..07077ff0c0 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-collection.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-collection.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateCollection( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-datetime-attribute.md index 252334b20f..24017ff8b4 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-datetime-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateDatetimeAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-document.md b/docs/examples/1.7.x/server-go/examples/databases/update-document.md index 5ec0e189e9..b36c9694db 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-document.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-document.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateDocument( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-documents.md b/docs/examples/1.7.x/server-go/examples/databases/update-documents.md index e654590691..e1b2a95bc9 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-documents.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-documents.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateDocuments( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-email-attribute.md index c2e0cf9552..e58ac912be 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-email-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-email-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateEmailAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-enum-attribute.md index fb993f37cc..ea6ef4b5f8 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-enum-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateEnumAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-float-attribute.md index 814da25bde..db0915a5e2 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-float-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-float-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateFloatAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-integer-attribute.md index 961374e3db..ac956b61bc 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-integer-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateIntegerAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-ip-attribute.md index 4895feb54d..faaefd7180 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-ip-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateIpAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-relationship-attribute.md index 6df9de2015..db8057a728 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-relationship-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateRelationshipAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-string-attribute.md index 0469527d04..f9876a2305 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-string-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-string-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateStringAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-url-attribute.md index 53e2a482ef..d97cf205ef 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update-url-attribute.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update-url-attribute.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpdateUrlAttribute( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/update.md b/docs/examples/1.7.x/server-go/examples/databases/update.md index 8f5c6896a6..c7fd49fcec 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/update.md +++ b/docs/examples/1.7.x/server-go/examples/databases/update.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.Update( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/databases/upsert-document.md b/docs/examples/1.7.x/server-go/examples/databases/upsert-document.md new file mode 100644 index 0000000000..e6241b9198 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/upsert-document.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := databases.New(client) + response, error := service.UpsertDocument( + "", + "", + "", + map[string]interface{}{}, + databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/upsert-documents.md b/docs/examples/1.7.x/server-go/examples/databases/upsert-documents.md index a8399f79c0..7e4550d512 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/upsert-documents.md +++ b/docs/examples/1.7.x/server-go/examples/databases/upsert-documents.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := databases.NewDatabases(client) + service := databases.New(client) response, error := service.UpsertDocuments( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/create-deployment.md index afcfeb3173..53cdbf2038 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/create-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/functions/create-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.CreateDeployment( "", file.NewInputFile("/path/to/file.png", "file.png"), diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/create-duplicate-deployment.md index f632371703..367ebd723d 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/functions/create-duplicate-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.CreateDuplicateDeployment( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-execution.md b/docs/examples/1.7.x/server-go/examples/functions/create-execution.md index 356e851376..33657d2503 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/create-execution.md +++ b/docs/examples/1.7.x/server-go/examples/functions/create-execution.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.CreateExecution( "", functions.WithCreateExecutionBody(""), diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/create-template-deployment.md index b0b1ab8f4a..87940ce5d4 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/create-template-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/functions/create-template-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.CreateTemplateDeployment( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-variable.md b/docs/examples/1.7.x/server-go/examples/functions/create-variable.md index 961869e325..68e4b7728e 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/create-variable.md +++ b/docs/examples/1.7.x/server-go/examples/functions/create-variable.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.CreateVariable( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/create-vcs-deployment.md index 06e583ebe1..76d98acd56 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/functions/create-vcs-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.CreateVcsDeployment( "", "branch", diff --git a/docs/examples/1.7.x/server-go/examples/functions/create.md b/docs/examples/1.7.x/server-go/examples/functions/create.md index c3b13d1ff7..63dc01c556 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/create.md +++ b/docs/examples/1.7.x/server-go/examples/functions/create.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.Create( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/delete-deployment.md index cf088e82c8..1763878c91 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/delete-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/functions/delete-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.DeleteDeployment( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-go/examples/functions/delete-execution.md index e863e3ba57..045f24ff1d 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/delete-execution.md +++ b/docs/examples/1.7.x/server-go/examples/functions/delete-execution.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.DeleteExecution( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-go/examples/functions/delete-variable.md index 7cb66a04ce..cbc3cdd57e 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/delete-variable.md +++ b/docs/examples/1.7.x/server-go/examples/functions/delete-variable.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.DeleteVariable( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/delete.md b/docs/examples/1.7.x/server-go/examples/functions/delete.md index ec006f2079..87bddcc6f3 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/delete.md +++ b/docs/examples/1.7.x/server-go/examples/functions/delete.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.Delete( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-go/examples/functions/get-deployment-download.md index f867d4f903..226537bc68 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/get-deployment-download.md +++ b/docs/examples/1.7.x/server-go/examples/functions/get-deployment-download.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.GetDeploymentDownload( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/get-deployment.md index 6b6824500a..d94d1a187a 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/get-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/functions/get-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.GetDeployment( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/get-execution.md b/docs/examples/1.7.x/server-go/examples/functions/get-execution.md index 627c95b5a7..739af771ee 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/get-execution.md +++ b/docs/examples/1.7.x/server-go/examples/functions/get-execution.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.GetExecution( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/get-variable.md b/docs/examples/1.7.x/server-go/examples/functions/get-variable.md index 003baf4011..f96c84ced3 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/get-variable.md +++ b/docs/examples/1.7.x/server-go/examples/functions/get-variable.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.GetVariable( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/get.md b/docs/examples/1.7.x/server-go/examples/functions/get.md index a18d0526de..bfa5333e41 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/get.md +++ b/docs/examples/1.7.x/server-go/examples/functions/get.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.Get( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-go/examples/functions/list-deployments.md index b137c3047c..8d040ce546 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/list-deployments.md +++ b/docs/examples/1.7.x/server-go/examples/functions/list-deployments.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.ListDeployments( "", functions.WithListDeploymentsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-executions.md b/docs/examples/1.7.x/server-go/examples/functions/list-executions.md index 758d3f80d7..aa7e551c90 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/list-executions.md +++ b/docs/examples/1.7.x/server-go/examples/functions/list-executions.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.ListExecutions( "", functions.WithListExecutionsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-go/examples/functions/list-runtimes.md index 76e4414df2..4e251247d3 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/list-runtimes.md +++ b/docs/examples/1.7.x/server-go/examples/functions/list-runtimes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.ListRuntimes( ) diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-go/examples/functions/list-specifications.md index c1abea5d17..9b554b1cde 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/list-specifications.md +++ b/docs/examples/1.7.x/server-go/examples/functions/list-specifications.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.ListSpecifications( ) diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-variables.md b/docs/examples/1.7.x/server-go/examples/functions/list-variables.md index e27df96670..68df7f8aa2 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/list-variables.md +++ b/docs/examples/1.7.x/server-go/examples/functions/list-variables.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.ListVariables( "", ) diff --git a/docs/examples/1.7.x/server-go/examples/functions/list.md b/docs/examples/1.7.x/server-go/examples/functions/list.md index 36a55d72b2..bff9229c08 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/list.md +++ b/docs/examples/1.7.x/server-go/examples/functions/list.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.List( functions.WithListQueries([]interface{}{}), functions.WithListSearch(""), diff --git a/docs/examples/1.7.x/server-go/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-go/examples/functions/update-deployment-status.md index d89d59200a..75dce2fe74 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/update-deployment-status.md +++ b/docs/examples/1.7.x/server-go/examples/functions/update-deployment-status.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.UpdateDeploymentStatus( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/update-function-deployment.md index ee0ccf5e21..e8a1c8b2af 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/update-function-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/functions/update-function-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.UpdateFunctionDeployment( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/update-variable.md b/docs/examples/1.7.x/server-go/examples/functions/update-variable.md index 42ec29a914..658540d027 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/update-variable.md +++ b/docs/examples/1.7.x/server-go/examples/functions/update-variable.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.UpdateVariable( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/functions/update.md b/docs/examples/1.7.x/server-go/examples/functions/update.md index 318ba4dfd0..7c2771efc8 100644 --- a/docs/examples/1.7.x/server-go/examples/functions/update.md +++ b/docs/examples/1.7.x/server-go/examples/functions/update.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := functions.NewFunctions(client) + service := functions.New(client) response, error := service.Update( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/graphql/mutation.md b/docs/examples/1.7.x/server-go/examples/graphql/mutation.md index 092e817c93..12ac4aeae1 100644 --- a/docs/examples/1.7.x/server-go/examples/graphql/mutation.md +++ b/docs/examples/1.7.x/server-go/examples/graphql/mutation.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := graphql.NewGraphql(client) + service := graphql.New(client) response, error := service.Mutation( map[string]interface{}{}, ) diff --git a/docs/examples/1.7.x/server-go/examples/graphql/query.md b/docs/examples/1.7.x/server-go/examples/graphql/query.md index 511d6c452e..ff67e5e30f 100644 --- a/docs/examples/1.7.x/server-go/examples/graphql/query.md +++ b/docs/examples/1.7.x/server-go/examples/graphql/query.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := graphql.NewGraphql(client) + service := graphql.New(client) response, error := service.Query( map[string]interface{}{}, ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-go/examples/health/get-antivirus.md index 1640c01c0e..ee880a756c 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-antivirus.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-antivirus.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetAntivirus( ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-cache.md b/docs/examples/1.7.x/server-go/examples/health/get-cache.md index 976d51fbe7..976a5b5a50 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-cache.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-cache.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetCache( ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-certificate.md b/docs/examples/1.7.x/server-go/examples/health/get-certificate.md index 44d1d1bb92..03cbbc190e 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-certificate.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-certificate.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetCertificate( health.WithGetCertificateDomain(""), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-d-b.md b/docs/examples/1.7.x/server-go/examples/health/get-d-b.md index 8f681a04c1..2ab86d11c0 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-d-b.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-d-b.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetDB( ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-go/examples/health/get-failed-jobs.md index 814b8850e8..59d8baffca 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-failed-jobs.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-failed-jobs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetFailedJobs( "v1-database", health.WithGetFailedJobsThreshold(0), diff --git a/docs/examples/1.7.x/server-go/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-go/examples/health/get-pub-sub.md index 6a3d67e838..451c47c806 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-pub-sub.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-pub-sub.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetPubSub( ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-builds.md index ebd1a2f3d8..e3a16fb1ae 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-builds.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-builds.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueBuilds( health.WithGetQueueBuildsThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-certificates.md index 473d953c15..42505bfc25 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-certificates.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-certificates.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueCertificates( health.WithGetQueueCertificatesThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-databases.md index 83eb8584a5..1f1d3669fa 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-databases.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-databases.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueDatabases( health.WithGetQueueDatabasesName(""), health.WithGetQueueDatabasesThreshold(0), diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-deletes.md index e491446f94..83c40caa4c 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-deletes.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-deletes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueDeletes( health.WithGetQueueDeletesThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-functions.md index c7cf45a355..d79f07e313 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-functions.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-functions.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueFunctions( health.WithGetQueueFunctionsThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-logs.md index b369c24277..b67123f8f8 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-logs.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-logs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueLogs( health.WithGetQueueLogsThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-mails.md index cc944d0cad..efbdfe48bb 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-mails.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-mails.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueMails( health.WithGetQueueMailsThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-messaging.md index 65c6c34610..65c167fc18 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-messaging.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-messaging.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueMessaging( health.WithGetQueueMessagingThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-migrations.md index d0c3bd2573..8a009960b1 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-migrations.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-migrations.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueMigrations( health.WithGetQueueMigrationsThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-resources.md index 5ed004c7cf..ba3c71317a 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-resources.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-resources.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueStatsResources( health.WithGetQueueStatsResourcesThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-usage.md index 5202371d1e..cdc175887f 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-usage.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-usage.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueUsage( health.WithGetQueueUsageThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-webhooks.md index 4782aef9ac..06791aa229 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-queue-webhooks.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-webhooks.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetQueueWebhooks( health.WithGetQueueWebhooksThreshold(0), ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-go/examples/health/get-storage-local.md index e58b944497..4e88e0a555 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-storage-local.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-storage-local.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetStorageLocal( ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-storage.md b/docs/examples/1.7.x/server-go/examples/health/get-storage.md index 73ae964d51..3ec9ed8f6d 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-storage.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-storage.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetStorage( ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get-time.md b/docs/examples/1.7.x/server-go/examples/health/get-time.md index 43c0ca46a4..323746e93d 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get-time.md +++ b/docs/examples/1.7.x/server-go/examples/health/get-time.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.GetTime( ) diff --git a/docs/examples/1.7.x/server-go/examples/health/get.md b/docs/examples/1.7.x/server-go/examples/health/get.md index c9730f70dd..50443c9430 100644 --- a/docs/examples/1.7.x/server-go/examples/health/get.md +++ b/docs/examples/1.7.x/server-go/examples/health/get.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := health.NewHealth(client) + service := health.New(client) response, error := service.Get( ) diff --git a/docs/examples/1.7.x/server-go/examples/locale/get.md b/docs/examples/1.7.x/server-go/examples/locale/get.md index 055889b6ce..801df85bb4 100644 --- a/docs/examples/1.7.x/server-go/examples/locale/get.md +++ b/docs/examples/1.7.x/server-go/examples/locale/get.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := locale.NewLocale(client) + service := locale.New(client) response, error := service.Get( ) diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-codes.md b/docs/examples/1.7.x/server-go/examples/locale/list-codes.md index a69a05d6cd..6625746b8a 100644 --- a/docs/examples/1.7.x/server-go/examples/locale/list-codes.md +++ b/docs/examples/1.7.x/server-go/examples/locale/list-codes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := locale.NewLocale(client) + service := locale.New(client) response, error := service.ListCodes( ) diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-continents.md b/docs/examples/1.7.x/server-go/examples/locale/list-continents.md index 0430fdbe99..f6e05db3c5 100644 --- a/docs/examples/1.7.x/server-go/examples/locale/list-continents.md +++ b/docs/examples/1.7.x/server-go/examples/locale/list-continents.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := locale.NewLocale(client) + service := locale.New(client) response, error := service.ListContinents( ) diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-go/examples/locale/list-countries-e-u.md index 92bd24d1f8..9f85161f1e 100644 --- a/docs/examples/1.7.x/server-go/examples/locale/list-countries-e-u.md +++ b/docs/examples/1.7.x/server-go/examples/locale/list-countries-e-u.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := locale.NewLocale(client) + service := locale.New(client) response, error := service.ListCountriesEU( ) diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-go/examples/locale/list-countries-phones.md index 1615834103..e7438be997 100644 --- a/docs/examples/1.7.x/server-go/examples/locale/list-countries-phones.md +++ b/docs/examples/1.7.x/server-go/examples/locale/list-countries-phones.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := locale.NewLocale(client) + service := locale.New(client) response, error := service.ListCountriesPhones( ) diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-countries.md b/docs/examples/1.7.x/server-go/examples/locale/list-countries.md index 25bbbd1538..5f00e6bca5 100644 --- a/docs/examples/1.7.x/server-go/examples/locale/list-countries.md +++ b/docs/examples/1.7.x/server-go/examples/locale/list-countries.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := locale.NewLocale(client) + service := locale.New(client) response, error := service.ListCountries( ) diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-go/examples/locale/list-currencies.md index e4bde5d9d9..6971eb12ec 100644 --- a/docs/examples/1.7.x/server-go/examples/locale/list-currencies.md +++ b/docs/examples/1.7.x/server-go/examples/locale/list-currencies.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := locale.NewLocale(client) + service := locale.New(client) response, error := service.ListCurrencies( ) diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-languages.md b/docs/examples/1.7.x/server-go/examples/locale/list-languages.md index acce3181be..23bb409a61 100644 --- a/docs/examples/1.7.x/server-go/examples/locale/list-languages.md +++ b/docs/examples/1.7.x/server-go/examples/locale/list-languages.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := locale.NewLocale(client) + service := locale.New(client) response, error := service.ListLanguages( ) diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-apns-provider.md index 620219e07d..36a5b747ce 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-apns-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-apns-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateApnsProvider( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-email.md b/docs/examples/1.7.x/server-go/examples/messaging/create-email.md index 3da6c88cf4..9915ae1398 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-email.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-email.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateEmail( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-fcm-provider.md index c70c340eb5..266b11ce5f 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-fcm-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-fcm-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateFcmProvider( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-mailgun-provider.md index e265218ef4..655cdbf4c3 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-mailgun-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateMailgunProvider( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-msg91provider.md index 53660cbfa0..85c17ff242 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-msg91provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateMsg91Provider( "", "", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-push.md b/docs/examples/1.7.x/server-go/examples/messaging/create-push.md index 214d6ae0ed..86bd58bab6 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-push.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-push.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("") // Your project ID + client.WithKey("") // Your secret API key + ) - client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("") // Your project ID - client.SetKey("") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreatePush( "", messaging.WithCreatePushTitle(""), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-sendgrid-provider.md index 69375a23ca..5bc3bd3e9b 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-sendgrid-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateSendgridProvider( "<PROVIDER_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-go/examples/messaging/create-sms.md index 95c7738969..0afa78f5f6 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-sms.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-sms.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateSms( "<MESSAGE_ID>", "<CONTENT>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-smtp-provider.md index 4c88b4ef7a..9d84f98a9f 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-smtp-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-smtp-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateSmtpProvider( "<PROVIDER_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-go/examples/messaging/create-subscriber.md index c4faa8544a..71a46d1cb2 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-subscriber.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-subscriber.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetJWT("<YOUR_JWT>") // Your secret JSON Web Token - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateSubscriber( "<TOPIC_ID>", "<SUBSCRIBER_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-telesign-provider.md index 11dd8c9bc6..e5afce8a43 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-telesign-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-telesign-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateTelesignProvider( "<PROVIDER_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-textmagic-provider.md index a036549240..8e36b21dd3 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-textmagic-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateTextmagicProvider( "<PROVIDER_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-go/examples/messaging/create-topic.md index 0453089fbc..9ded515cf2 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-topic.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-topic.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateTopic( "<TOPIC_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-twilio-provider.md index cd8a993a6c..1a5d4c79b3 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-twilio-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-twilio-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateTwilioProvider( "<PROVIDER_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-vonage-provider.md index e17e8d885b..10d72a2a5b 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/create-vonage-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-vonage-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.CreateVonageProvider( "<PROVIDER_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/delete-provider.md index 2c5b77d622..1b492df4a2 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/delete-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/delete-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.DeleteProvider( "<PROVIDER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-go/examples/messaging/delete-subscriber.md index fec03f53f7..8bdbc6c26b 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/delete-subscriber.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetJWT("<YOUR_JWT>") // Your secret JSON Web Token - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.DeleteSubscriber( "<TOPIC_ID>", "<SUBSCRIBER_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-go/examples/messaging/delete-topic.md index 3a9787b6ce..4bfc03f504 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/delete-topic.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/delete-topic.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.DeleteTopic( "<TOPIC_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/messaging/delete.md b/docs/examples/1.7.x/server-go/examples/messaging/delete.md index 4d5accd22f..da0cc65cec 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/delete.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/delete.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.Delete( "<MESSAGE_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/messaging/get-message.md b/docs/examples/1.7.x/server-go/examples/messaging/get-message.md index d6db3188c8..0273ce7373 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/get-message.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/get-message.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.GetMessage( "<MESSAGE_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/get-provider.md index ff2bab3acf..f3736147ea 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/get-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/get-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.GetProvider( "<PROVIDER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-go/examples/messaging/get-subscriber.md index 47fccf23cd..da46b98e6e 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/get-subscriber.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/get-subscriber.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.GetSubscriber( "<TOPIC_ID>", "<SUBSCRIBER_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-go/examples/messaging/get-topic.md index a332f55ba4..005acefe3d 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/get-topic.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/get-topic.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.GetTopic( "<TOPIC_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-go/examples/messaging/list-message-logs.md index b4a5528b41..2af8b23fc8 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/list-message-logs.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-message-logs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.ListMessageLogs( "<MESSAGE_ID>", messaging.WithListMessageLogsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-go/examples/messaging/list-messages.md index f1ca97d3fe..afc5646f02 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/list-messages.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-messages.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.ListMessages( messaging.WithListMessagesQueries([]interface{}{}), messaging.WithListMessagesSearch("<SEARCH>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-go/examples/messaging/list-provider-logs.md index 945dbcfd4e..665916c968 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/list-provider-logs.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-provider-logs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.ListProviderLogs( "<PROVIDER_ID>", messaging.WithListProviderLogsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-go/examples/messaging/list-providers.md index 57c09a2061..20c23231b2 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/list-providers.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-providers.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.ListProviders( messaging.WithListProvidersQueries([]interface{}{}), messaging.WithListProvidersSearch("<SEARCH>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-go/examples/messaging/list-subscriber-logs.md index cb2f050dd9..b794781ad1 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-subscriber-logs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.ListSubscriberLogs( "<SUBSCRIBER_ID>", messaging.WithListSubscriberLogsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-go/examples/messaging/list-subscribers.md index 045777d8c4..98c63eb0b6 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/list-subscribers.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-subscribers.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.ListSubscribers( "<TOPIC_ID>", messaging.WithListSubscribersQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-go/examples/messaging/list-targets.md index 9cc65e0d1c..3df399eab3 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/list-targets.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-targets.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.ListTargets( "<MESSAGE_ID>", messaging.WithListTargetsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-go/examples/messaging/list-topic-logs.md index 2e928dbfc7..d972c202ed 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/list-topic-logs.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-topic-logs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.ListTopicLogs( "<TOPIC_ID>", messaging.WithListTopicLogsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-go/examples/messaging/list-topics.md index 69574ae02f..ca9dba1528 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/list-topics.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-topics.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.ListTopics( messaging.WithListTopicsQueries([]interface{}{}), messaging.WithListTopicsSearch("<SEARCH>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-apns-provider.md index aac3e39c6e..74e4fa56f8 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-apns-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-apns-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateApnsProvider( "<PROVIDER_ID>", messaging.WithUpdateApnsProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-email.md b/docs/examples/1.7.x/server-go/examples/messaging/update-email.md index f1e9f081d2..7dd06e3ea2 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-email.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-email.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateEmail( "<MESSAGE_ID>", messaging.WithUpdateEmailTopics([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-fcm-provider.md index 55e4b90363..c70327a022 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-fcm-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-fcm-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateFcmProvider( "<PROVIDER_ID>", messaging.WithUpdateFcmProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-mailgun-provider.md index 5bb229f348..80f078b056 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-mailgun-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateMailgunProvider( "<PROVIDER_ID>", messaging.WithUpdateMailgunProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-msg91provider.md index d19c500262..70dbad455b 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-msg91provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateMsg91Provider( "<PROVIDER_ID>", messaging.WithUpdateMsg91ProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-push.md b/docs/examples/1.7.x/server-go/examples/messaging/update-push.md index 856b95dc1b..e68bd77311 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-push.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-push.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdatePush( "<MESSAGE_ID>", messaging.WithUpdatePushTopics([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-sendgrid-provider.md index 5742b44874..9c442e26e5 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-sendgrid-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateSendgridProvider( "<PROVIDER_ID>", messaging.WithUpdateSendgridProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-go/examples/messaging/update-sms.md index 09b3456d38..f62798e298 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-sms.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-sms.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateSms( "<MESSAGE_ID>", messaging.WithUpdateSmsTopics([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-smtp-provider.md index b99f86e123..ccfb91b1b9 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-smtp-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-smtp-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateSmtpProvider( "<PROVIDER_ID>", messaging.WithUpdateSmtpProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-telesign-provider.md index 5fb99a68ec..77549380c8 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-telesign-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-telesign-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateTelesignProvider( "<PROVIDER_ID>", messaging.WithUpdateTelesignProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-textmagic-provider.md index 24e619cc7f..55350f7a1e 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-textmagic-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateTextmagicProvider( "<PROVIDER_ID>", messaging.WithUpdateTextmagicProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-go/examples/messaging/update-topic.md index ab8902b4b2..a83b5e4852 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-topic.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-topic.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateTopic( "<TOPIC_ID>", messaging.WithUpdateTopicName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-twilio-provider.md index 316a2516d1..61b95dabf1 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-twilio-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-twilio-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateTwilioProvider( "<PROVIDER_ID>", messaging.WithUpdateTwilioProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-vonage-provider.md index d17452140a..4cfc03c2b5 100644 --- a/docs/examples/1.7.x/server-go/examples/messaging/update-vonage-provider.md +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-vonage-provider.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := messaging.NewMessaging(client) + service := messaging.New(client) response, error := service.UpdateVonageProvider( "<PROVIDER_ID>", messaging.WithUpdateVonageProviderName("<NAME>"), diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/create-deployment.md index 0e97c8083a..5a13b3e152 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/create-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/sites/create-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.CreateDeployment( "<SITE_ID>", file.NewInputFile("/path/to/file.png", "file.png"), diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/create-duplicate-deployment.md index a128fda185..84b4932b36 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/sites/create-duplicate-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.CreateDuplicateDeployment( "<SITE_ID>", "<DEPLOYMENT_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/create-template-deployment.md index 2c1e8fb5c5..b67f65f6c9 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/create-template-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/sites/create-template-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.CreateTemplateDeployment( "<SITE_ID>", "<REPOSITORY>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-variable.md b/docs/examples/1.7.x/server-go/examples/sites/create-variable.md index 1660ad24a1..05148190e9 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/create-variable.md +++ b/docs/examples/1.7.x/server-go/examples/sites/create-variable.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.CreateVariable( "<SITE_ID>", "<KEY>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/create-vcs-deployment.md index 2135f71edb..c13edc5900 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/sites/create-vcs-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.CreateVcsDeployment( "<SITE_ID>", "branch", diff --git a/docs/examples/1.7.x/server-go/examples/sites/create.md b/docs/examples/1.7.x/server-go/examples/sites/create.md index c683404d86..f87a3068a2 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/create.md +++ b/docs/examples/1.7.x/server-go/examples/sites/create.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.Create( "<SITE_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/delete-deployment.md index 83daf67634..5e5de1a888 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/delete-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/sites/delete-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.DeleteDeployment( "<SITE_ID>", "<DEPLOYMENT_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/delete-log.md b/docs/examples/1.7.x/server-go/examples/sites/delete-log.md index 6f17e84dc4..fe3add16fe 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/delete-log.md +++ b/docs/examples/1.7.x/server-go/examples/sites/delete-log.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.DeleteLog( "<SITE_ID>", "<LOG_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-go/examples/sites/delete-variable.md index 80f8b7cda9..389d454c4c 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/delete-variable.md +++ b/docs/examples/1.7.x/server-go/examples/sites/delete-variable.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.DeleteVariable( "<SITE_ID>", "<VARIABLE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/delete.md b/docs/examples/1.7.x/server-go/examples/sites/delete.md index 4015d9c51e..184276dc4b 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/delete.md +++ b/docs/examples/1.7.x/server-go/examples/sites/delete.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.Delete( "<SITE_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-go/examples/sites/get-deployment-download.md index 1e97fba0c6..a90d358073 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/get-deployment-download.md +++ b/docs/examples/1.7.x/server-go/examples/sites/get-deployment-download.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.GetDeploymentDownload( "<SITE_ID>", "<DEPLOYMENT_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/get-deployment.md index cf4be1f92e..17d066e8fe 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/get-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/sites/get-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.GetDeployment( "<SITE_ID>", "<DEPLOYMENT_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/get-log.md b/docs/examples/1.7.x/server-go/examples/sites/get-log.md index 2b19b2b8a8..ca0031546d 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/get-log.md +++ b/docs/examples/1.7.x/server-go/examples/sites/get-log.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.GetLog( "<SITE_ID>", "<LOG_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/get-variable.md b/docs/examples/1.7.x/server-go/examples/sites/get-variable.md index 6c8395a5db..55f8ddf6ca 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/get-variable.md +++ b/docs/examples/1.7.x/server-go/examples/sites/get-variable.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.GetVariable( "<SITE_ID>", "<VARIABLE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/get.md b/docs/examples/1.7.x/server-go/examples/sites/get.md index a2fae14dff..e876766da8 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/get.md +++ b/docs/examples/1.7.x/server-go/examples/sites/get.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.Get( "<SITE_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-go/examples/sites/list-deployments.md index f81580f39f..b6ab37ea79 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/list-deployments.md +++ b/docs/examples/1.7.x/server-go/examples/sites/list-deployments.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.ListDeployments( "<SITE_ID>", sites.WithListDeploymentsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-go/examples/sites/list-frameworks.md index c134c0bf40..dae9a1814d 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/list-frameworks.md +++ b/docs/examples/1.7.x/server-go/examples/sites/list-frameworks.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.ListFrameworks( ) diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-logs.md b/docs/examples/1.7.x/server-go/examples/sites/list-logs.md index 7d7a841b64..1c756cdbb6 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/list-logs.md +++ b/docs/examples/1.7.x/server-go/examples/sites/list-logs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.ListLogs( "<SITE_ID>", sites.WithListLogsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-go/examples/sites/list-specifications.md index 4136f61881..96d74c7fc3 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/list-specifications.md +++ b/docs/examples/1.7.x/server-go/examples/sites/list-specifications.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.ListSpecifications( ) diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-variables.md b/docs/examples/1.7.x/server-go/examples/sites/list-variables.md index e3070ad75b..c6d329736d 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/list-variables.md +++ b/docs/examples/1.7.x/server-go/examples/sites/list-variables.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.ListVariables( "<SITE_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/sites/list.md b/docs/examples/1.7.x/server-go/examples/sites/list.md index d879280802..e43442226a 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/list.md +++ b/docs/examples/1.7.x/server-go/examples/sites/list.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.List( sites.WithListQueries([]interface{}{}), sites.WithListSearch("<SEARCH>"), diff --git a/docs/examples/1.7.x/server-go/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-go/examples/sites/update-deployment-status.md index efb388e3c6..3c8cd3201d 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/update-deployment-status.md +++ b/docs/examples/1.7.x/server-go/examples/sites/update-deployment-status.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.UpdateDeploymentStatus( "<SITE_ID>", "<DEPLOYMENT_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/update-site-deployment.md index 5904a76a74..806fbb35a6 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/update-site-deployment.md +++ b/docs/examples/1.7.x/server-go/examples/sites/update-site-deployment.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.UpdateSiteDeployment( "<SITE_ID>", "<DEPLOYMENT_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/update-variable.md b/docs/examples/1.7.x/server-go/examples/sites/update-variable.md index d50fe8c046..c2f0506b44 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/update-variable.md +++ b/docs/examples/1.7.x/server-go/examples/sites/update-variable.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.UpdateVariable( "<SITE_ID>", "<VARIABLE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/sites/update.md b/docs/examples/1.7.x/server-go/examples/sites/update.md index 4001eb4f48..3dd53e283a 100644 --- a/docs/examples/1.7.x/server-go/examples/sites/update.md +++ b/docs/examples/1.7.x/server-go/examples/sites/update.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := sites.NewSites(client) + service := sites.New(client) response, error := service.Update( "<SITE_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-go/examples/storage/create-bucket.md index 39dc1d06d9..a2679d9894 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/create-bucket.md +++ b/docs/examples/1.7.x/server-go/examples/storage/create-bucket.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.CreateBucket( "<BUCKET_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/storage/create-file.md b/docs/examples/1.7.x/server-go/examples/storage/create-file.md index 1ca815c92e..4d87231490 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/create-file.md +++ b/docs/examples/1.7.x/server-go/examples/storage/create-file.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.CreateFile( "<BUCKET_ID>", "<FILE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-go/examples/storage/delete-bucket.md index 37a3f69b25..28832a1187 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/delete-bucket.md +++ b/docs/examples/1.7.x/server-go/examples/storage/delete-bucket.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.DeleteBucket( "<BUCKET_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/storage/delete-file.md b/docs/examples/1.7.x/server-go/examples/storage/delete-file.md index 522aacae72..e616054107 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/delete-file.md +++ b/docs/examples/1.7.x/server-go/examples/storage/delete-file.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.DeleteFile( "<BUCKET_ID>", "<FILE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-go/examples/storage/get-bucket.md index b76ac37d25..acb722546e 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/get-bucket.md +++ b/docs/examples/1.7.x/server-go/examples/storage/get-bucket.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.GetBucket( "<BUCKET_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md index 9aa461de89..c0a1724eac 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.GetFileDownload( "<BUCKET_ID>", "<FILE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md index 511cad1325..5d7d75a4f8 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.GetFilePreview( "<BUCKET_ID>", "<FILE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md index 5832517534..ca59105821 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.GetFileView( "<BUCKET_ID>", "<FILE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file.md b/docs/examples/1.7.x/server-go/examples/storage/get-file.md index 824c86f054..b33170e93c 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/get-file.md +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.GetFile( "<BUCKET_ID>", "<FILE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-go/examples/storage/list-buckets.md index 00dd8d657b..79f4c4b3e4 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/list-buckets.md +++ b/docs/examples/1.7.x/server-go/examples/storage/list-buckets.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.ListBuckets( storage.WithListBucketsQueries([]interface{}{}), storage.WithListBucketsSearch("<SEARCH>"), diff --git a/docs/examples/1.7.x/server-go/examples/storage/list-files.md b/docs/examples/1.7.x/server-go/examples/storage/list-files.md index a84dfac6fd..2c2652a97e 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/list-files.md +++ b/docs/examples/1.7.x/server-go/examples/storage/list-files.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.ListFiles( "<BUCKET_ID>", storage.WithListFilesQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-go/examples/storage/update-bucket.md index 58efff687b..ac28e5b649 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/update-bucket.md +++ b/docs/examples/1.7.x/server-go/examples/storage/update-bucket.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.UpdateBucket( "<BUCKET_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/storage/update-file.md b/docs/examples/1.7.x/server-go/examples/storage/update-file.md index f1705138e9..d6887a82c1 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/update-file.md +++ b/docs/examples/1.7.x/server-go/examples/storage/update-file.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := storage.NewStorage(client) + service := storage.New(client) response, error := service.UpdateFile( "<BUCKET_ID>", "<FILE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/teams/create-membership.md b/docs/examples/1.7.x/server-go/examples/teams/create-membership.md index 90c3d82348..e6cfb8b9c8 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/create-membership.md +++ b/docs/examples/1.7.x/server-go/examples/teams/create-membership.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.CreateMembership( "<TEAM_ID>", []interface{}{}, diff --git a/docs/examples/1.7.x/server-go/examples/teams/create.md b/docs/examples/1.7.x/server-go/examples/teams/create.md index 1898936941..773da7afcd 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/create.md +++ b/docs/examples/1.7.x/server-go/examples/teams/create.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.Create( "<TEAM_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-go/examples/teams/delete-membership.md index 78810817a9..5ffee885fb 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/delete-membership.md +++ b/docs/examples/1.7.x/server-go/examples/teams/delete-membership.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.DeleteMembership( "<TEAM_ID>", "<MEMBERSHIP_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/teams/delete.md b/docs/examples/1.7.x/server-go/examples/teams/delete.md index fb4771605d..c66c7056bd 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/delete.md +++ b/docs/examples/1.7.x/server-go/examples/teams/delete.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.Delete( "<TEAM_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/teams/get-membership.md b/docs/examples/1.7.x/server-go/examples/teams/get-membership.md index c61b9c57c3..466ab72059 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/get-membership.md +++ b/docs/examples/1.7.x/server-go/examples/teams/get-membership.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.GetMembership( "<TEAM_ID>", "<MEMBERSHIP_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-go/examples/teams/get-prefs.md index c237cd144a..d8400e420a 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/get-prefs.md +++ b/docs/examples/1.7.x/server-go/examples/teams/get-prefs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.GetPrefs( "<TEAM_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/teams/get.md b/docs/examples/1.7.x/server-go/examples/teams/get.md index c29e9fa786..0f503c7f5b 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/get.md +++ b/docs/examples/1.7.x/server-go/examples/teams/get.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.Get( "<TEAM_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-go/examples/teams/list-memberships.md index 1e8fb45ca7..90b2babcb0 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/list-memberships.md +++ b/docs/examples/1.7.x/server-go/examples/teams/list-memberships.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.ListMemberships( "<TEAM_ID>", teams.WithListMembershipsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/teams/list.md b/docs/examples/1.7.x/server-go/examples/teams/list.md index c4b109f1f3..e70ca11587 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/list.md +++ b/docs/examples/1.7.x/server-go/examples/teams/list.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.List( teams.WithListQueries([]interface{}{}), teams.WithListSearch("<SEARCH>"), diff --git a/docs/examples/1.7.x/server-go/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-go/examples/teams/update-membership-status.md index fbec3b8e84..c9e1215971 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/update-membership-status.md +++ b/docs/examples/1.7.x/server-go/examples/teams/update-membership-status.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.UpdateMembershipStatus( "<TEAM_ID>", "<MEMBERSHIP_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/teams/update-membership.md b/docs/examples/1.7.x/server-go/examples/teams/update-membership.md index 1b478a1913..8721a5ed6d 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/update-membership.md +++ b/docs/examples/1.7.x/server-go/examples/teams/update-membership.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.UpdateMembership( "<TEAM_ID>", "<MEMBERSHIP_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/teams/update-name.md b/docs/examples/1.7.x/server-go/examples/teams/update-name.md index a7b5da7c20..0d75a7bb32 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/update-name.md +++ b/docs/examples/1.7.x/server-go/examples/teams/update-name.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.UpdateName( "<TEAM_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-go/examples/teams/update-prefs.md index 6d395add21..e9631d5bf3 100644 --- a/docs/examples/1.7.x/server-go/examples/teams/update-prefs.md +++ b/docs/examples/1.7.x/server-go/examples/teams/update-prefs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetSession("") // The user session to authenticate with - - service := teams.NewTeams(client) + service := teams.New(client) response, error := service.UpdatePrefs( "<TEAM_ID>", map[string]interface{}{}, diff --git a/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md index 8343e3e077..3109062d9e 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := tokens.NewTokens(client) + service := tokens.New(client) response, error := service.CreateFileToken( "<BUCKET_ID>", "<FILE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/tokens/delete.md b/docs/examples/1.7.x/server-go/examples/tokens/delete.md index 73322e6c9b..a376bab09b 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/delete.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := tokens.NewTokens(client) + service := tokens.New(client) response, error := service.Delete( "<TOKEN_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/tokens/get.md b/docs/examples/1.7.x/server-go/examples/tokens/get.md index 64b53a24b9..4c01f68669 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/get.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := tokens.NewTokens(client) + service := tokens.New(client) response, error := service.Get( "<TOKEN_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/tokens/list.md b/docs/examples/1.7.x/server-go/examples/tokens/list.md index e4864cd74a..99876af081 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/list.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := tokens.NewTokens(client) + service := tokens.New(client) response, error := service.List( "<BUCKET_ID>", "<FILE_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/tokens/update.md b/docs/examples/1.7.x/server-go/examples/tokens/update.md index 94c30ece79..eaba8eaafb 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/update.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := tokens.NewTokens(client) + service := tokens.New(client) response, error := service.Update( "<TOKEN_ID>", tokens.WithUpdateExpire(""), diff --git a/docs/examples/1.7.x/server-go/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-go/examples/users/create-argon2user.md index 44eaafbcd4..28565ff01c 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-argon2user.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-argon2user.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateArgon2User( "<USER_ID>", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-go/examples/users/create-bcrypt-user.md index d818598c70..fedf00327e 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-bcrypt-user.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateBcryptUser( "<USER_ID>", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-go/examples/users/create-j-w-t.md index dc1e51b195..c335ab4ea1 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-j-w-t.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-j-w-t.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateJWT( "<USER_ID>", users.WithCreateJWTSessionId("<SESSION_ID>"), diff --git a/docs/examples/1.7.x/server-go/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-go/examples/users/create-m-d5user.md index 1dba39c5fd..369aab7ac7 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-m-d5user.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-m-d5user.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateMD5User( "<USER_ID>", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/users/create-mfa-recovery-codes.md index 3078f0993b..1c2097e571 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-mfa-recovery-codes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateMfaRecoveryCodes( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-go/examples/users/create-p-h-pass-user.md index c0380bd9f3..2a09bec811 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-p-h-pass-user.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreatePHPassUser( "<USER_ID>", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-go/examples/users/create-s-h-a-user.md index 93aa77e853..2bc05f91f9 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-s-h-a-user.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateSHAUser( "<USER_ID>", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-go/examples/users/create-scrypt-modified-user.md index cd48f6c83f..f815121290 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-scrypt-modified-user.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateScryptModifiedUser( "<USER_ID>", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-go/examples/users/create-scrypt-user.md index 65d70e986f..f2fde655d2 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-scrypt-user.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-scrypt-user.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateScryptUser( "<USER_ID>", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/users/create-session.md b/docs/examples/1.7.x/server-go/examples/users/create-session.md index 92304e647d..b868319613 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-session.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-session.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateSession( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/create-target.md b/docs/examples/1.7.x/server-go/examples/users/create-target.md index db42e2c391..71c449c603 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-target.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-target.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateTarget( "<USER_ID>", "<TARGET_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/users/create-token.md b/docs/examples/1.7.x/server-go/examples/users/create-token.md index 6181a8d9d4..d50c7efc28 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create-token.md +++ b/docs/examples/1.7.x/server-go/examples/users/create-token.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.CreateToken( "<USER_ID>", users.WithCreateTokenLength(4), diff --git a/docs/examples/1.7.x/server-go/examples/users/create.md b/docs/examples/1.7.x/server-go/examples/users/create.md index 0ab673bc73..7cd8920bb2 100644 --- a/docs/examples/1.7.x/server-go/examples/users/create.md +++ b/docs/examples/1.7.x/server-go/examples/users/create.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.Create( "<USER_ID>", users.WithCreateEmail("email@example.com"), diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-identity.md b/docs/examples/1.7.x/server-go/examples/users/delete-identity.md index 1095a1763a..f35a7917cc 100644 --- a/docs/examples/1.7.x/server-go/examples/users/delete-identity.md +++ b/docs/examples/1.7.x/server-go/examples/users/delete-identity.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.DeleteIdentity( "<IDENTITY_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-go/examples/users/delete-mfa-authenticator.md index d61c5db0c8..bb845b90c1 100644 --- a/docs/examples/1.7.x/server-go/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.7.x/server-go/examples/users/delete-mfa-authenticator.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.DeleteMfaAuthenticator( "<USER_ID>", "totp", diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-session.md b/docs/examples/1.7.x/server-go/examples/users/delete-session.md index 2a0de4c271..62f4bd5a89 100644 --- a/docs/examples/1.7.x/server-go/examples/users/delete-session.md +++ b/docs/examples/1.7.x/server-go/examples/users/delete-session.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.DeleteSession( "<USER_ID>", "<SESSION_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-go/examples/users/delete-sessions.md index ea15501819..235b2b1e9e 100644 --- a/docs/examples/1.7.x/server-go/examples/users/delete-sessions.md +++ b/docs/examples/1.7.x/server-go/examples/users/delete-sessions.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.DeleteSessions( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-target.md b/docs/examples/1.7.x/server-go/examples/users/delete-target.md index d4cd4e51a8..ce942a9ead 100644 --- a/docs/examples/1.7.x/server-go/examples/users/delete-target.md +++ b/docs/examples/1.7.x/server-go/examples/users/delete-target.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.DeleteTarget( "<USER_ID>", "<TARGET_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/users/delete.md b/docs/examples/1.7.x/server-go/examples/users/delete.md index 2c359e3ab0..1654957c95 100644 --- a/docs/examples/1.7.x/server-go/examples/users/delete.md +++ b/docs/examples/1.7.x/server-go/examples/users/delete.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.Delete( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/users/get-mfa-recovery-codes.md index 485075546f..8b16231be7 100644 --- a/docs/examples/1.7.x/server-go/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/1.7.x/server-go/examples/users/get-mfa-recovery-codes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.GetMfaRecoveryCodes( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/get-prefs.md b/docs/examples/1.7.x/server-go/examples/users/get-prefs.md index 0dba272388..4d3298fab8 100644 --- a/docs/examples/1.7.x/server-go/examples/users/get-prefs.md +++ b/docs/examples/1.7.x/server-go/examples/users/get-prefs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.GetPrefs( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/get-target.md b/docs/examples/1.7.x/server-go/examples/users/get-target.md index b1291d7490..481052d75d 100644 --- a/docs/examples/1.7.x/server-go/examples/users/get-target.md +++ b/docs/examples/1.7.x/server-go/examples/users/get-target.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.GetTarget( "<USER_ID>", "<TARGET_ID>", diff --git a/docs/examples/1.7.x/server-go/examples/users/get.md b/docs/examples/1.7.x/server-go/examples/users/get.md index c6aae29d5d..a4da4b741d 100644 --- a/docs/examples/1.7.x/server-go/examples/users/get.md +++ b/docs/examples/1.7.x/server-go/examples/users/get.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.Get( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/list-identities.md b/docs/examples/1.7.x/server-go/examples/users/list-identities.md index 063b9100fb..a9916f5fa3 100644 --- a/docs/examples/1.7.x/server-go/examples/users/list-identities.md +++ b/docs/examples/1.7.x/server-go/examples/users/list-identities.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.ListIdentities( users.WithListIdentitiesQueries([]interface{}{}), users.WithListIdentitiesSearch("<SEARCH>"), diff --git a/docs/examples/1.7.x/server-go/examples/users/list-logs.md b/docs/examples/1.7.x/server-go/examples/users/list-logs.md index 674668b965..bb36dc531c 100644 --- a/docs/examples/1.7.x/server-go/examples/users/list-logs.md +++ b/docs/examples/1.7.x/server-go/examples/users/list-logs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.ListLogs( "<USER_ID>", users.WithListLogsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/users/list-memberships.md b/docs/examples/1.7.x/server-go/examples/users/list-memberships.md index 08b9a884f4..1591603971 100644 --- a/docs/examples/1.7.x/server-go/examples/users/list-memberships.md +++ b/docs/examples/1.7.x/server-go/examples/users/list-memberships.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.ListMemberships( "<USER_ID>", users.WithListMembershipsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-go/examples/users/list-mfa-factors.md index 1c39b87a66..8709b21ae7 100644 --- a/docs/examples/1.7.x/server-go/examples/users/list-mfa-factors.md +++ b/docs/examples/1.7.x/server-go/examples/users/list-mfa-factors.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.ListMfaFactors( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/list-sessions.md b/docs/examples/1.7.x/server-go/examples/users/list-sessions.md index 835c23b1bc..be4202400c 100644 --- a/docs/examples/1.7.x/server-go/examples/users/list-sessions.md +++ b/docs/examples/1.7.x/server-go/examples/users/list-sessions.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.ListSessions( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/list-targets.md b/docs/examples/1.7.x/server-go/examples/users/list-targets.md index 84c2c312a9..ed78ade5a8 100644 --- a/docs/examples/1.7.x/server-go/examples/users/list-targets.md +++ b/docs/examples/1.7.x/server-go/examples/users/list-targets.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.ListTargets( "<USER_ID>", users.WithListTargetsQueries([]interface{}{}), diff --git a/docs/examples/1.7.x/server-go/examples/users/list.md b/docs/examples/1.7.x/server-go/examples/users/list.md index 247ad4c2e7..c74a59a7e2 100644 --- a/docs/examples/1.7.x/server-go/examples/users/list.md +++ b/docs/examples/1.7.x/server-go/examples/users/list.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.List( users.WithListQueries([]interface{}{}), users.WithListSearch("<SEARCH>"), diff --git a/docs/examples/1.7.x/server-go/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-go/examples/users/update-email-verification.md index 70f5a10757..411cd831c5 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-email-verification.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-email-verification.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdateEmailVerification( "<USER_ID>", false, diff --git a/docs/examples/1.7.x/server-go/examples/users/update-email.md b/docs/examples/1.7.x/server-go/examples/users/update-email.md index 697783b967..1e01350731 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-email.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-email.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdateEmail( "<USER_ID>", "email@example.com", diff --git a/docs/examples/1.7.x/server-go/examples/users/update-labels.md b/docs/examples/1.7.x/server-go/examples/users/update-labels.md index a65d2ead9d..0b735cdef5 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-labels.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-labels.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdateLabels( "<USER_ID>", []interface{}{}, diff --git a/docs/examples/1.7.x/server-go/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/users/update-mfa-recovery-codes.md index eb47e2ee09..d495b752de 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-mfa-recovery-codes.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdateMfaRecoveryCodes( "<USER_ID>", ) diff --git a/docs/examples/1.7.x/server-go/examples/users/update-mfa.md b/docs/examples/1.7.x/server-go/examples/users/update-mfa.md index 756863799f..cfcddbf5e1 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-mfa.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-mfa.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdateMfa( "<USER_ID>", false, diff --git a/docs/examples/1.7.x/server-go/examples/users/update-name.md b/docs/examples/1.7.x/server-go/examples/users/update-name.md index 8ef173c2e3..da9f3d5ac7 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-name.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-name.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdateName( "<USER_ID>", "<NAME>", diff --git a/docs/examples/1.7.x/server-go/examples/users/update-password.md b/docs/examples/1.7.x/server-go/examples/users/update-password.md index 2f9efac65f..d09f5bb92c 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-password.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-password.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdatePassword( "<USER_ID>", "", diff --git a/docs/examples/1.7.x/server-go/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-go/examples/users/update-phone-verification.md index c94fbd861e..fdf01898ea 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-phone-verification.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-phone-verification.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdatePhoneVerification( "<USER_ID>", false, diff --git a/docs/examples/1.7.x/server-go/examples/users/update-phone.md b/docs/examples/1.7.x/server-go/examples/users/update-phone.md index 77d20162f9..f4f5b5d01d 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-phone.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-phone.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdatePhone( "<USER_ID>", "+12065550100", diff --git a/docs/examples/1.7.x/server-go/examples/users/update-prefs.md b/docs/examples/1.7.x/server-go/examples/users/update-prefs.md index f7889a6337..75cb55b868 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-prefs.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-prefs.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdatePrefs( "<USER_ID>", map[string]interface{}{}, diff --git a/docs/examples/1.7.x/server-go/examples/users/update-status.md b/docs/examples/1.7.x/server-go/examples/users/update-status.md index 2349e4e0c9..964ed3bf92 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-status.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-status.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdateStatus( "<USER_ID>", false, diff --git a/docs/examples/1.7.x/server-go/examples/users/update-target.md b/docs/examples/1.7.x/server-go/examples/users/update-target.md index f8028b4483..2c1ab3b71e 100644 --- a/docs/examples/1.7.x/server-go/examples/users/update-target.md +++ b/docs/examples/1.7.x/server-go/examples/users/update-target.md @@ -7,13 +7,13 @@ import ( ) func main() { - client := client.NewClient() + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) - client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.SetProject("<YOUR_PROJECT_ID>") // Your project ID - client.SetKey("<YOUR_API_KEY>") // Your secret API key - - service := users.NewUsers(client) + service := users.New(client) response, error := service.UpdateTarget( "<USER_ID>", "<TARGET_ID>", From 8b160d7dc0d05c32c76f864987f38184cfb7a4a7 Mon Sep 17 00:00:00 2001 From: Laura Du Ry <123562732+LauraDuRy@users.noreply.github.com> Date: Wed, 18 Jun 2025 13:47:24 +0200 Subject: [PATCH 13/21] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d19d56fdd0..93bf3290ff 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ > [Get started with Appwrite](https://apwr.dev/appcloud) -> [Join the Init kick off event 19th of May: The future of Appwrite with Founder & CEO Eldad Fux](https://www.youtube.com/watch?v=1g8tuogsp7A) <br /> <p align="center"> From 484d5ca4b42495b796b36136198845d382832b04 Mon Sep 17 00:00:00 2001 From: Laura Du Ry <123562732+LauraDuRy@users.noreply.github.com> Date: Thu, 26 Jun 2025 13:10:57 +0200 Subject: [PATCH 14/21] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae237071fa..bfc115544a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ <a href="https://appwrite.io" target="_blank"><img src="./public/images/banner.png" alt="Appwrite banner, with logo and text saying "Build Like a Team of Hundreds"></a> <br /> <br /> - <b>Appwrite is a backend platform for developing Web, Mobile, and Flutter applications. Built with the open source community and optimized for developer experience in the coding languages you love.</b> + <b>Appwrite is an all-in-one development platform for Web, Mobile, and Flutter applications. Use built-in backend infrastructure and web hosting, all from a single place. Built with the open source community and optimized for developer experience in the coding languages you love.</b> <br /> <br /> </p> From 991c86c937b832aaea1fc3dbcb38ad442f67886d Mon Sep 17 00:00:00 2001 From: Laura Du Ry <123562732+LauraDuRy@users.noreply.github.com> Date: Tue, 1 Jul 2025 14:26:25 +0200 Subject: [PATCH 15/21] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index bfc115544a..1f5888481a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ + +> We just announced a new Databases featue: CSV imports. [Learn more in the announcement](https://appwrite.io/blog/post/announcing-csv-imports) + > [Get started with Appwrite](https://apwr.dev/appcloud) <br /> From eea09c56f8cc1bd2e6ea620df272c634d8c0d612 Mon Sep 17 00:00:00 2001 From: Laura Du Ry <123562732+LauraDuRy@users.noreply.github.com> Date: Tue, 1 Jul 2025 15:38:19 +0200 Subject: [PATCH 16/21] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f5888481a..784e37054d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -> We just announced a new Databases featue: CSV imports. [Learn more in the announcement](https://appwrite.io/blog/post/announcing-csv-imports) +> We just announced a new Databases feature: CSV imports. [Learn more in the announcement](https://appwrite.io/blog/post/announcing-csv-imports) > [Get started with Appwrite](https://apwr.dev/appcloud) From 925ac33536330cf4a16265905018f09fe3054947 Mon Sep 17 00:00:00 2001 From: Laura Du Ry <123562732+LauraDuRy@users.noreply.github.com> Date: Tue, 1 Jul 2025 16:47:10 +0200 Subject: [PATCH 17/21] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 784e37054d..2b176dfab2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -> We just announced a new Databases feature: CSV imports. [Learn more in the announcement](https://appwrite.io/blog/post/announcing-csv-imports) +> We just announced CSV imports for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-csv-imports) > [Get started with Appwrite](https://apwr.dev/appcloud) From a8982bfb808ec784e624d47c889eb38df9b11352 Mon Sep 17 00:00:00 2001 From: Veeresh <75656445+Veera-mulge@users.noreply.github.com> Date: Thu, 3 Jul 2025 14:44:39 +0530 Subject: [PATCH 18/21] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b176dfab2..f2db639671 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -> We just announced CSV imports for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-csv-imports) +> We just announced Bulk API for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-bulk-api) > [Get started with Appwrite](https://apwr.dev/appcloud) From b5035c70346c9bfe51ef7bc331113e93d5f46f80 Mon Sep 17 00:00:00 2001 From: Veeresh <75656445+Veera-mulge@users.noreply.github.com> Date: Mon, 7 Jul 2025 11:03:40 +0530 Subject: [PATCH 19/21] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f2db639671..a2f7cf0797 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -> We just announced Bulk API for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-bulk-api) +> We just announced Database Upsert for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-database-upsert) > [Get started with Appwrite](https://apwr.dev/appcloud) From c6f6b6db90d56b9fca5eacf11623d0e2078f66d9 Mon Sep 17 00:00:00 2001 From: Veeresh <75656445+Veera-mulge@users.noreply.github.com> Date: Thu, 10 Jul 2025 19:30:13 +0530 Subject: [PATCH 20/21] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a2f7cf0797..d34d1fcbae 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -> We just announced Database Upsert for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-database-upsert) +> We just announced Encrypted string attribute support for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-encrypted-string-attributes) > [Get started with Appwrite](https://apwr.dev/appcloud) From 7b87decba4bfc028ad8d9fef29f63001cbe374be Mon Sep 17 00:00:00 2001 From: Veeresh <75656445+Veera-mulge@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:47:34 +0530 Subject: [PATCH 21/21] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d34d1fcbae..2c76f27e13 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -> We just announced Encrypted string attribute support for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-encrypted-string-attributes) +> We just announced Auto-increment support for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-auto-increment-support) > [Get started with Appwrite](https://apwr.dev/appcloud)