mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Update docs
This commit is contained in:
Generated
+6
-6
@@ -4926,16 +4926,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "appwrite/sdk-generator",
|
||||
"version": "1.1.8",
|
||||
"version": "1.1.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||
"reference": "ecdbbf7ad1afacbb1355bfdb7bd3db990c767623"
|
||||
"reference": "0968928543fc78ae83676a5844010bf8422b3470"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ecdbbf7ad1afacbb1355bfdb7bd3db990c767623",
|
||||
"reference": "ecdbbf7ad1afacbb1355bfdb7bd3db990c767623",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/0968928543fc78ae83676a5844010bf8422b3470",
|
||||
"reference": "0968928543fc78ae83676a5844010bf8422b3470",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4971,9 +4971,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/1.1.8"
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/1.1.12"
|
||||
},
|
||||
"time": "2025-08-25T16:12:32+00:00"
|
||||
"time": "2025-08-26T08:46:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
|
||||
@@ -6,19 +6,11 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateAnonymousSession(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateAnonymousSession())
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateEmailPasswordSession(
|
||||
"email@example.com",
|
||||
"password",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateEmailPasswordSession(
|
||||
"email@example.com",
|
||||
"password",
|
||||
)
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateEmailToken(
|
||||
"<USER_ID>",
|
||||
"email@example.com",
|
||||
account.WithCreateEmailTokenPhrase(false),
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateEmailToken(
|
||||
"<USER_ID>",
|
||||
"email@example.com",
|
||||
account.WithCreateEmailTokenPhrase(false),
|
||||
)
|
||||
|
||||
@@ -6,19 +6,11 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateJWT(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateJWT())
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateMagicURLToken(
|
||||
"<USER_ID>",
|
||||
"email@example.com",
|
||||
account.WithCreateMagicURLTokenUrl("https://example.com"),
|
||||
account.WithCreateMagicURLTokenPhrase(false),
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateMagicURLToken(
|
||||
"<USER_ID>",
|
||||
"email@example.com",
|
||||
account.WithCreateMagicURLTokenUrl("https://example.com"),
|
||||
account.WithCreateMagicURLTokenPhrase(false),
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateMFAAuthenticator(
|
||||
"totp",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateMFAAuthenticator(
|
||||
"totp",
|
||||
)
|
||||
|
||||
@@ -6,20 +6,13 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateMFAChallenge(
|
||||
"email",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateMFAChallenge(
|
||||
"email",
|
||||
)
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateMFARecoveryCodes(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateMFARecoveryCodes())
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateOAuth2Token(
|
||||
"amazon",
|
||||
account.WithCreateOAuth2TokenSuccess("https://example.com"),
|
||||
account.WithCreateOAuth2TokenFailure("https://example.com"),
|
||||
account.WithCreateOAuth2TokenScopes([]interface{}{}),
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateOAuth2Token(
|
||||
"amazon",
|
||||
account.WithCreateOAuth2TokenSuccess("https://example.com"),
|
||||
account.WithCreateOAuth2TokenFailure("https://example.com"),
|
||||
account.WithCreateOAuth2TokenScopes([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreatePhoneToken(
|
||||
"<USER_ID>",
|
||||
"+12065550100",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreatePhoneToken(
|
||||
"<USER_ID>",
|
||||
"+12065550100",
|
||||
)
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreatePhoneVerification(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreatePhoneVerification())
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateRecovery(
|
||||
"email@example.com",
|
||||
"https://example.com",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateRecovery(
|
||||
"email@example.com",
|
||||
"https://example.com",
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateSession(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateSession(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.CreateVerification(
|
||||
"https://example.com",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateVerification(
|
||||
"https://example.com",
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.Create(
|
||||
"<USER_ID>",
|
||||
"email@example.com",
|
||||
"",
|
||||
account.WithCreateName("<NAME>"),
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.Create(
|
||||
"<USER_ID>",
|
||||
"email@example.com",
|
||||
"",
|
||||
account.WithCreateName("<NAME>"),
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.DeleteIdentity(
|
||||
"<IDENTITY_ID>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DeleteIdentity(
|
||||
"<IDENTITY_ID>",
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.DeleteMFAAuthenticator(
|
||||
"totp",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DeleteMFAAuthenticator(
|
||||
"totp",
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.DeleteSession(
|
||||
"<SESSION_ID>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DeleteSession(
|
||||
"<SESSION_ID>",
|
||||
)
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.DeleteSessions(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DeleteSessions())
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.GetMFARecoveryCodes(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetMFARecoveryCodes())
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.GetPrefs(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetPrefs())
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.GetSession(
|
||||
"<SESSION_ID>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetSession(
|
||||
"<SESSION_ID>",
|
||||
)
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.Get(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.Get())
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.ListIdentities(
|
||||
account.WithListIdentitiesQueries([]interface{}{}),
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.ListIdentities(
|
||||
account.WithListIdentitiesQueries([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.ListLogs(
|
||||
account.WithListLogsQueries([]interface{}{}),
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.ListLogs(
|
||||
account.WithListLogsQueries([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.ListMFAFactors(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.ListMFAFactors())
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.ListSessions(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.ListSessions())
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateEmail(
|
||||
"email@example.com",
|
||||
"password",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateEmail(
|
||||
"email@example.com",
|
||||
"password",
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateMagicURLSession(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateMagicURLSession(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateMFAAuthenticator(
|
||||
"totp",
|
||||
"<OTP>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateMFAAuthenticator(
|
||||
"totp",
|
||||
"<OTP>",
|
||||
)
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateMFAChallenge(
|
||||
"<CHALLENGE_ID>",
|
||||
"<OTP>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateMFAChallenge(
|
||||
"<CHALLENGE_ID>",
|
||||
"<OTP>",
|
||||
)
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateMFARecoveryCodes(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateMFARecoveryCodes())
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateMFA(
|
||||
false,
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateMFA(
|
||||
false,
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateName(
|
||||
"<NAME>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateName(
|
||||
"<NAME>",
|
||||
)
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdatePassword(
|
||||
"",
|
||||
account.WithUpdatePasswordOldPassword("password"),
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdatePassword(
|
||||
"",
|
||||
account.WithUpdatePasswordOldPassword("password"),
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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 := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdatePhoneSession(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdatePhoneSession(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdatePhoneVerification(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdatePhoneVerification(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdatePhone(
|
||||
"+12065550100",
|
||||
"password",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdatePhone(
|
||||
"+12065550100",
|
||||
"password",
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdatePrefs(
|
||||
map[string]interface{}{},
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdatePrefs(
|
||||
map[string]interface{}{},
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateRecovery(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
"",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateRecovery(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
"",
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateSession(
|
||||
"<SESSION_ID>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateSession(
|
||||
"<SESSION_ID>",
|
||||
)
|
||||
|
||||
@@ -6,20 +6,12 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateStatus(
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateStatus())
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/account"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := account.New(client)
|
||||
response, error := service.UpdateVerification(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
service := account.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateVerification(
|
||||
"<USER_ID>",
|
||||
"<SECRET>",
|
||||
)
|
||||
|
||||
@@ -6,24 +6,17 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/avatars"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := avatars.New(client)
|
||||
response, error := service.GetBrowser(
|
||||
"aa",
|
||||
avatars.WithGetBrowserWidth(0),
|
||||
avatars.WithGetBrowserHeight(0),
|
||||
avatars.WithGetBrowserQuality(-1),
|
||||
)
|
||||
service := avatars.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetBrowser(
|
||||
"aa",
|
||||
avatars.WithGetBrowserWidth(0),
|
||||
avatars.WithGetBrowserHeight(0),
|
||||
avatars.WithGetBrowserQuality(-1),
|
||||
)
|
||||
|
||||
@@ -6,24 +6,17 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/avatars"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := avatars.New(client)
|
||||
response, error := service.GetCreditCard(
|
||||
"amex",
|
||||
avatars.WithGetCreditCardWidth(0),
|
||||
avatars.WithGetCreditCardHeight(0),
|
||||
avatars.WithGetCreditCardQuality(-1),
|
||||
)
|
||||
service := avatars.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetCreditCard(
|
||||
"amex",
|
||||
avatars.WithGetCreditCardWidth(0),
|
||||
avatars.WithGetCreditCardHeight(0),
|
||||
avatars.WithGetCreditCardQuality(-1),
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/avatars"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := avatars.New(client)
|
||||
response, error := service.GetFavicon(
|
||||
"https://example.com",
|
||||
)
|
||||
service := avatars.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetFavicon(
|
||||
"https://example.com",
|
||||
)
|
||||
|
||||
@@ -6,24 +6,17 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/avatars"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := avatars.New(client)
|
||||
response, error := service.GetFlag(
|
||||
"af",
|
||||
avatars.WithGetFlagWidth(0),
|
||||
avatars.WithGetFlagHeight(0),
|
||||
avatars.WithGetFlagQuality(-1),
|
||||
)
|
||||
service := avatars.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetFlag(
|
||||
"af",
|
||||
avatars.WithGetFlagWidth(0),
|
||||
avatars.WithGetFlagHeight(0),
|
||||
avatars.WithGetFlagQuality(-1),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/avatars"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := avatars.New(client)
|
||||
response, error := service.GetImage(
|
||||
"https://example.com",
|
||||
avatars.WithGetImageWidth(0),
|
||||
avatars.WithGetImageHeight(0),
|
||||
)
|
||||
service := avatars.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetImage(
|
||||
"https://example.com",
|
||||
avatars.WithGetImageWidth(0),
|
||||
avatars.WithGetImageHeight(0),
|
||||
)
|
||||
|
||||
@@ -6,24 +6,17 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/avatars"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := avatars.New(client)
|
||||
response, error := service.GetInitials(
|
||||
avatars.WithGetInitialsName("<NAME>"),
|
||||
avatars.WithGetInitialsWidth(0),
|
||||
avatars.WithGetInitialsHeight(0),
|
||||
avatars.WithGetInitialsBackground(""),
|
||||
)
|
||||
service := avatars.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetInitials(
|
||||
avatars.WithGetInitialsName("<NAME>"),
|
||||
avatars.WithGetInitialsWidth(0),
|
||||
avatars.WithGetInitialsHeight(0),
|
||||
avatars.WithGetInitialsBackground(""),
|
||||
)
|
||||
|
||||
@@ -6,24 +6,17 @@ import (
|
||||
"github.com/appwrite/sdk-for-go/avatars"
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := avatars.New(client)
|
||||
response, error := service.GetQR(
|
||||
"<TEXT>",
|
||||
avatars.WithGetQRSize(1),
|
||||
avatars.WithGetQRMargin(0),
|
||||
avatars.WithGetQRDownload(false),
|
||||
)
|
||||
service := avatars.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetQR(
|
||||
"<TEXT>",
|
||||
avatars.WithGetQRSize(1),
|
||||
avatars.WithGetQRMargin(0),
|
||||
avatars.WithGetQRDownload(false),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateBooleanAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateBooleanAttributeDefault(false),
|
||||
databases.WithCreateBooleanAttributeArray(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateBooleanAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateBooleanAttributeDefault(false),
|
||||
databases.WithCreateBooleanAttributeArray(false),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateCollection(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<NAME>",
|
||||
databases.WithCreateCollectionPermissions(interface{}{"read("any")"}),
|
||||
databases.WithCreateCollectionDocumentSecurity(false),
|
||||
databases.WithCreateCollectionEnabled(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateCollection(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<NAME>",
|
||||
databases.WithCreateCollectionPermissions(interface{}{"read("any")"}),
|
||||
databases.WithCreateCollectionDocumentSecurity(false),
|
||||
databases.WithCreateCollectionEnabled(false),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateDatetimeAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateDatetimeAttributeDefault(""),
|
||||
databases.WithCreateDatetimeAttributeArray(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateDatetimeAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateDatetimeAttributeDefault(""),
|
||||
databases.WithCreateDatetimeAttributeArray(false),
|
||||
)
|
||||
|
||||
@@ -6,25 +6,18 @@ import (
|
||||
"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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
map[string]interface{}{},
|
||||
databases.WithCreateDocumentPermissions(interface{}{"read("any")"}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
map[string]interface{}{},
|
||||
databases.WithCreateDocumentPermissions(interface{}{"read("any")"}),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
[]interface{}{},
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
[]interface{}{},
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateEmailAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateEmailAttributeDefault("email@example.com"),
|
||||
databases.WithCreateEmailAttributeArray(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateEmailAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateEmailAttributeDefault("email@example.com"),
|
||||
databases.WithCreateEmailAttributeArray(false),
|
||||
)
|
||||
|
||||
@@ -6,27 +6,20 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateEnumAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
[]interface{}{},
|
||||
false,
|
||||
databases.WithCreateEnumAttributeDefault("<DEFAULT>"),
|
||||
databases.WithCreateEnumAttributeArray(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateEnumAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
[]interface{}{},
|
||||
false,
|
||||
databases.WithCreateEnumAttributeDefault("<DEFAULT>"),
|
||||
databases.WithCreateEnumAttributeArray(false),
|
||||
)
|
||||
|
||||
@@ -6,28 +6,21 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateFloatAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateFloatAttributeMin(0),
|
||||
databases.WithCreateFloatAttributeMax(0),
|
||||
databases.WithCreateFloatAttributeDefault(0),
|
||||
databases.WithCreateFloatAttributeArray(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateFloatAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateFloatAttributeMin(0),
|
||||
databases.WithCreateFloatAttributeMax(0),
|
||||
databases.WithCreateFloatAttributeDefault(0),
|
||||
databases.WithCreateFloatAttributeArray(false),
|
||||
)
|
||||
|
||||
@@ -6,27 +6,20 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateIndex(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
"key",
|
||||
[]interface{}{},
|
||||
databases.WithCreateIndexOrders([]interface{}{}),
|
||||
databases.WithCreateIndexLengths([]interface{}{}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateIndex(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
"key",
|
||||
[]interface{}{},
|
||||
databases.WithCreateIndexOrders([]interface{}{}),
|
||||
databases.WithCreateIndexLengths([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,28 +6,21 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateIntegerAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateIntegerAttributeMin(0),
|
||||
databases.WithCreateIntegerAttributeMax(0),
|
||||
databases.WithCreateIntegerAttributeDefault(0),
|
||||
databases.WithCreateIntegerAttributeArray(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateIntegerAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateIntegerAttributeMin(0),
|
||||
databases.WithCreateIntegerAttributeMax(0),
|
||||
databases.WithCreateIntegerAttributeDefault(0),
|
||||
databases.WithCreateIntegerAttributeArray(false),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateIpAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateIpAttributeDefault(""),
|
||||
databases.WithCreateIpAttributeArray(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateIpAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateIpAttributeDefault(""),
|
||||
databases.WithCreateIpAttributeArray(false),
|
||||
)
|
||||
|
||||
@@ -6,28 +6,21 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateRelationshipAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<RELATED_COLLECTION_ID>",
|
||||
"oneToOne",
|
||||
databases.WithCreateRelationshipAttributeTwoWay(false),
|
||||
databases.WithCreateRelationshipAttributeKey(""),
|
||||
databases.WithCreateRelationshipAttributeTwoWayKey(""),
|
||||
databases.WithCreateRelationshipAttributeOnDelete("cascade"),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateRelationshipAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<RELATED_COLLECTION_ID>",
|
||||
"oneToOne",
|
||||
databases.WithCreateRelationshipAttributeTwoWay(false),
|
||||
databases.WithCreateRelationshipAttributeKey(""),
|
||||
databases.WithCreateRelationshipAttributeTwoWayKey(""),
|
||||
databases.WithCreateRelationshipAttributeOnDelete("cascade"),
|
||||
)
|
||||
|
||||
@@ -6,28 +6,21 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateStringAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
1,
|
||||
false,
|
||||
databases.WithCreateStringAttributeDefault("<DEFAULT>"),
|
||||
databases.WithCreateStringAttributeArray(false),
|
||||
databases.WithCreateStringAttributeEncrypt(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateStringAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
1,
|
||||
false,
|
||||
databases.WithCreateStringAttributeDefault("<DEFAULT>"),
|
||||
databases.WithCreateStringAttributeArray(false),
|
||||
databases.WithCreateStringAttributeEncrypt(false),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.CreateUrlAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateUrlAttributeDefault("https://example.com"),
|
||||
databases.WithCreateUrlAttributeArray(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.CreateUrlAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreateUrlAttributeDefault("https://example.com"),
|
||||
databases.WithCreateUrlAttributeArray(false),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.Create(
|
||||
"<DATABASE_ID>",
|
||||
"<NAME>",
|
||||
databases.WithCreateEnabled(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.Create(
|
||||
"<DATABASE_ID>",
|
||||
"<NAME>",
|
||||
databases.WithCreateEnabled(false),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.DecrementDocumentAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
"",
|
||||
databases.WithDecrementDocumentAttributeValue(0),
|
||||
databases.WithDecrementDocumentAttributeMin(0),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DecrementDocumentAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
"",
|
||||
databases.WithDecrementDocumentAttributeValue(0),
|
||||
databases.WithDecrementDocumentAttributeMin(0),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.DeleteAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DeleteAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
)
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.DeleteCollection(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DeleteCollection(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.DeleteDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DeleteDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.DeleteDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithDeleteDocumentsQueries([]interface{}{}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DeleteDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithDeleteDocumentsQueries([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.DeleteIndex(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.DeleteIndex(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.Delete(
|
||||
"<DATABASE_ID>",
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.Delete(
|
||||
"<DATABASE_ID>",
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.GetAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
)
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.GetCollection(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetCollection(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
)
|
||||
|
||||
@@ -6,24 +6,17 @@ import (
|
||||
"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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.GetDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
databases.WithGetDocumentQueries([]interface{}{}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
databases.WithGetDocumentQueries([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.GetIndex(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.GetIndex(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
)
|
||||
|
||||
@@ -6,21 +6,14 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.Get(
|
||||
"<DATABASE_ID>",
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.Get(
|
||||
"<DATABASE_ID>",
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.IncrementDocumentAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
"",
|
||||
databases.WithIncrementDocumentAttributeValue(0),
|
||||
databases.WithIncrementDocumentAttributeMax(0),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.IncrementDocumentAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
"",
|
||||
databases.WithIncrementDocumentAttributeValue(0),
|
||||
databases.WithIncrementDocumentAttributeMax(0),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.ListAttributes(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithListAttributesQueries([]interface{}{}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.ListAttributes(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithListAttributesQueries([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.ListCollections(
|
||||
"<DATABASE_ID>",
|
||||
databases.WithListCollectionsQueries([]interface{}{}),
|
||||
databases.WithListCollectionsSearch("<SEARCH>"),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.ListCollections(
|
||||
"<DATABASE_ID>",
|
||||
databases.WithListCollectionsQueries([]interface{}{}),
|
||||
databases.WithListCollectionsSearch("<SEARCH>"),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.ListDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithListDocumentsQueries([]interface{}{}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.ListDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithListDocumentsQueries([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.ListIndexes(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithListIndexesQueries([]interface{}{}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.ListIndexes(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithListIndexesQueries([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,22 +6,15 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.List(
|
||||
databases.WithListQueries([]interface{}{}),
|
||||
databases.WithListSearch("<SEARCH>"),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.List(
|
||||
databases.WithListQueries([]interface{}{}),
|
||||
databases.WithListSearch("<SEARCH>"),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateBooleanAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
false,
|
||||
databases.WithUpdateBooleanAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateBooleanAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
false,
|
||||
databases.WithUpdateBooleanAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateCollection(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<NAME>",
|
||||
databases.WithUpdateCollectionPermissions(interface{}{"read("any")"}),
|
||||
databases.WithUpdateCollectionDocumentSecurity(false),
|
||||
databases.WithUpdateCollectionEnabled(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateCollection(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<NAME>",
|
||||
databases.WithUpdateCollectionPermissions(interface{}{"read("any")"}),
|
||||
databases.WithUpdateCollectionDocumentSecurity(false),
|
||||
databases.WithUpdateCollectionEnabled(false),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateDatetimeAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
databases.WithUpdateDatetimeAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateDatetimeAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
databases.WithUpdateDatetimeAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,25 +6,18 @@ import (
|
||||
"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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
databases.WithUpdateDocumentData(map[string]interface{}{}),
|
||||
databases.WithUpdateDocumentPermissions(interface{}{"read("any")"}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
databases.WithUpdateDocumentData(map[string]interface{}{}),
|
||||
databases.WithUpdateDocumentPermissions(interface{}{"read("any")"}),
|
||||
)
|
||||
|
||||
@@ -6,24 +6,17 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithUpdateDocumentsData(map[string]interface{}{}),
|
||||
databases.WithUpdateDocumentsQueries([]interface{}{}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
databases.WithUpdateDocumentsData(map[string]interface{}{}),
|
||||
databases.WithUpdateDocumentsQueries([]interface{}{}),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateEmailAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"email@example.com",
|
||||
databases.WithUpdateEmailAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateEmailAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"email@example.com",
|
||||
databases.WithUpdateEmailAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,27 +6,20 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateEnumAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
[]interface{}{},
|
||||
false,
|
||||
"<DEFAULT>",
|
||||
databases.WithUpdateEnumAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateEnumAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
[]interface{}{},
|
||||
false,
|
||||
"<DEFAULT>",
|
||||
databases.WithUpdateEnumAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,28 +6,21 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateFloatAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
0,
|
||||
databases.WithUpdateFloatAttributeMin(0),
|
||||
databases.WithUpdateFloatAttributeMax(0),
|
||||
databases.WithUpdateFloatAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateFloatAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
0,
|
||||
databases.WithUpdateFloatAttributeMin(0),
|
||||
databases.WithUpdateFloatAttributeMax(0),
|
||||
databases.WithUpdateFloatAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,28 +6,21 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateIntegerAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
0,
|
||||
databases.WithUpdateIntegerAttributeMin(0),
|
||||
databases.WithUpdateIntegerAttributeMax(0),
|
||||
databases.WithUpdateIntegerAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateIntegerAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
0,
|
||||
databases.WithUpdateIntegerAttributeMin(0),
|
||||
databases.WithUpdateIntegerAttributeMax(0),
|
||||
databases.WithUpdateIntegerAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateIpAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
databases.WithUpdateIpAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateIpAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
databases.WithUpdateIpAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,25 +6,18 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateRelationshipAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
databases.WithUpdateRelationshipAttributeOnDelete("cascade"),
|
||||
databases.WithUpdateRelationshipAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateRelationshipAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
databases.WithUpdateRelationshipAttributeOnDelete("cascade"),
|
||||
databases.WithUpdateRelationshipAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,27 +6,20 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateStringAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"<DEFAULT>",
|
||||
databases.WithUpdateStringAttributeSize(1),
|
||||
databases.WithUpdateStringAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateStringAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"<DEFAULT>",
|
||||
databases.WithUpdateStringAttributeSize(1),
|
||||
databases.WithUpdateStringAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,26 +6,19 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpdateUrlAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"https://example.com",
|
||||
databases.WithUpdateUrlAttributeNewKey(""),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpdateUrlAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
"https://example.com",
|
||||
databases.WithUpdateUrlAttributeNewKey(""),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.Update(
|
||||
"<DATABASE_ID>",
|
||||
"<NAME>",
|
||||
databases.WithUpdateEnabled(false),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.Update(
|
||||
"<DATABASE_ID>",
|
||||
"<NAME>",
|
||||
databases.WithUpdateEnabled(false),
|
||||
)
|
||||
|
||||
@@ -6,25 +6,18 @@ import (
|
||||
"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
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithSession("")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpsertDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
map[string]interface{}{},
|
||||
databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}),
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpsertDocument(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
map[string]interface{}{},
|
||||
databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}),
|
||||
)
|
||||
|
||||
@@ -6,23 +6,16 @@ import (
|
||||
"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.WithKey("<YOUR_API_KEY>") // Your secret API key
|
||||
)
|
||||
client := client.New(
|
||||
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := databases.New(client)
|
||||
response, error := service.UpsertDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
[]interface{}{},
|
||||
)
|
||||
service := databases.New(client)
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
response, error := service.UpsertDocuments(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
[]interface{}{},
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user