Merge pull request #10001 from appwrite/fix-golang-sdk-examples

Fix Golang SDK examples for docs
This commit is contained in:
Steven Nguyen 2025-06-19 15:11:29 -07:00 committed by GitHub
commit e56c03a007
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
301 changed files with 1814 additions and 1784 deletions

View file

@ -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.*",

14
composer.lock generated
View file

@ -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",

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateAnonymousSession(
)

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateEmailPasswordSession(
"email@example.com",
"password",

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateEmailToken(
"<USER_ID>",
"email@example.com",

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateJWT(
)

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateMagicURLToken(
"<USER_ID>",
"email@example.com",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateMfaAuthenticator(
"totp",
)

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateMfaChallenge(
"email",
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateMfaRecoveryCodes(
)

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateOAuth2Token(
"amazon",
account.WithCreateOAuth2TokenSuccess("https://example.com"),

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.CreatePhoneToken(
"<USER_ID>",
"+12065550100",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.CreatePhoneVerification(
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateRecovery(
"email@example.com",
"https://example.com",

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateSession(
"<USER_ID>",
"<SECRET>",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.CreateVerification(
"https://example.com",
)

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.Create(
"<USER_ID>",
"email@example.com",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.DeleteIdentity(
"<IDENTITY_ID>",
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.DeleteMfaAuthenticator(
"totp",
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.DeleteSession(
"<SESSION_ID>",
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.DeleteSessions(
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.GetMfaRecoveryCodes(
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.GetPrefs(
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.GetSession(
"<SESSION_ID>",
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.Get(
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.ListIdentities(
account.WithListIdentitiesQueries([]interface{}{}),
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.ListLogs(
account.WithListLogsQueries([]interface{}{}),
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.ListMfaFactors(
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.ListSessions(
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateEmail(
"email@example.com",
"password",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateMFA(
false,
)

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateMagicURLSession(
"<USER_ID>",
"<SECRET>",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateMfaAuthenticator(
"totp",
"<OTP>",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateMfaChallenge(
"<CHALLENGE_ID>",
"<OTP>",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateMfaRecoveryCodes(
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateName(
"<NAME>",
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdatePassword(
"",
account.WithUpdatePasswordOldPassword("password"),

View file

@ -7,12 +7,12 @@ 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.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdatePhoneSession(
"<USER_ID>",
"<SECRET>",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdatePhoneVerification(
"<USER_ID>",
"<SECRET>",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdatePhone(
"+12065550100",
"password",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdatePrefs(
map[string]interface{}{},
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateRecovery(
"<USER_ID>",
"<SECRET>",

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateSession(
"<SESSION_ID>",
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateStatus(
)

View file

@ -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 := account.NewAccount(client)
service := account.New(client)
response, error := service.UpdateVerification(
"<USER_ID>",
"<SECRET>",

View file

@ -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 := avatars.NewAvatars(client)
service := avatars.New(client)
response, error := service.GetBrowser(
"aa",
avatars.WithGetBrowserWidth(0),

View file

@ -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 := avatars.NewAvatars(client)
service := avatars.New(client)
response, error := service.GetCreditCard(
"amex",
avatars.WithGetCreditCardWidth(0),

View file

@ -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 := avatars.NewAvatars(client)
service := avatars.New(client)
response, error := service.GetFavicon(
"https://example.com",
)

View file

@ -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 := avatars.NewAvatars(client)
service := avatars.New(client)
response, error := service.GetFlag(
"af",
avatars.WithGetFlagWidth(0),

View file

@ -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 := avatars.NewAvatars(client)
service := avatars.New(client)
response, error := service.GetImage(
"https://example.com",
avatars.WithGetImageWidth(0),

View file

@ -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 := avatars.NewAvatars(client)
service := avatars.New(client)
response, error := service.GetInitials(
avatars.WithGetInitialsName("<NAME>"),
avatars.WithGetInitialsWidth(0),

View file

@ -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 := avatars.NewAvatars(client)
service := avatars.New(client)
response, error := service.GetQR(
"<TEXT>",
avatars.WithGetQRSize(1),

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateBooleanAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateCollection(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateDatetimeAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -7,14 +7,14 @@ import (
)
func main() {
client := client.NewClient()
client := client.New(
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.WithSession("") // The user session to authenticate with
client.WithKey("<YOUR_API_KEY>") // Your secret API key
client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token
)
client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetSession("") // The user session to authenticate with
client.SetKey("<YOUR_API_KEY>") // Your secret API key
client.SetJWT("<YOUR_JWT>") // Your secret JSON Web Token
service := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateDocument(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -7,12 +7,12 @@ import (
)
func main() {
client := client.NewClient()
client := client.New(
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.WithKey("<YOUR_API_KEY>") // Your secret API key
)
client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetKey("<YOUR_API_KEY>") // Your secret API key
service := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateEmailAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateEnumAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateFloatAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateIndex(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateIntegerAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateIpAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateRelationshipAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateStringAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.CreateUrlAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.Create(
"<DATABASE_ID>",
"<NAME>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.DeleteAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.DeleteCollection(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.DeleteDocument(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.DeleteDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.DeleteIndex(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.Delete(
"<DATABASE_ID>",
)

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.GetAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.GetCollection(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.GetDocument(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.GetIndex(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.Get(
"<DATABASE_ID>",
)

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.ListAttributes(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.ListCollections(
"<DATABASE_ID>",
databases.WithListCollectionsQueries([]interface{}{}),

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.ListDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.ListIndexes(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.List(
databases.WithListQueries([]interface{}{}),
databases.WithListSearch("<SEARCH>"),

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateBooleanAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateCollection(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateDatetimeAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateDocument(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateEmailAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateEnumAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateFloatAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateIntegerAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateIpAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateRelationshipAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateStringAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpdateUrlAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.Update(
"<DATABASE_ID>",
"<NAME>",

View file

@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.WithProject("<YOUR_PROJECT_ID>") // Your project ID
client.WithSession("") // The user session to authenticate with
)
service := databases.New(client)
response, error := service.UpsertDocument(
"<DATABASE_ID>",
"<COLLECTION_ID>",
"<DOCUMENT_ID>",
map[string]interface{}{},
databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}),
)
if error != nil {
panic(error)
}
fmt.Println(response)
}

View file

@ -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 := databases.NewDatabases(client)
service := databases.New(client)
response, error := service.UpsertDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",

View file

@ -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 := functions.NewFunctions(client)
service := functions.New(client)
response, error := service.CreateDeployment(
"<FUNCTION_ID>",
file.NewInputFile("/path/to/file.png", "file.png"),

Some files were not shown because too many files have changed in this diff Show more