diff --git a/composer.lock b/composer.lock index cd9a43ebf3..638436d6df 100644 --- a/composer.lock +++ b/composer.lock @@ -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", diff --git a/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md index ff8aea9751..c2f23a5b2c 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md @@ -6,19 +6,11 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - service := account.New(client) - response, error := service.CreateAnonymousSession( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateAnonymousSession()) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md index 18d8dbc184..66a55b953e 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - 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", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-email-token.md b/docs/examples/1.8.x/server-go/examples/account/create-email-token.md index c057af5b9d..b2a1aac498 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-email-token.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - service := account.New(client) - response, error := service.CreateEmailToken( - "", - "email@example.com", - account.WithCreateEmailTokenPhrase(false), - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateEmailToken( + "", + "email@example.com", + account.WithCreateEmailTokenPhrase(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-jwt.md b/docs/examples/1.8.x/server-go/examples/account/create-jwt.md index 665f365e20..153c70d9fc 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-jwt.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-jwt.md @@ -6,19 +6,11 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - service := account.New(client) - response, error := service.CreateJWT( - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateJWT()) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-magic-url-token.md b/docs/examples/1.8.x/server-go/examples/account/create-magic-url-token.md index cad88c183d..b36a2d99b1 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-magic-url-token.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-magic-url-token.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - service := account.New(client) - response, error := service.CreateMagicURLToken( - "", - "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( + "", + "email@example.com", + account.WithCreateMagicURLTokenUrl("https://example.com"), + account.WithCreateMagicURLTokenPhrase(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md index 07c3ba8860..c0124d6cf9 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md index dd1cdff7f6..0ae3262568 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md @@ -6,20 +6,13 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - 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", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md index d5d4eb2e54..332102ea64 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-o-auth-2-token.md b/docs/examples/1.8.x/server-go/examples/account/create-o-auth-2-token.md index 56a2acdbf1..19b9258f00 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-o-auth-2-token.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-o-auth-2-token.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - 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{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md index b6c2ec7db7..97737e5646 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - service := account.New(client) - response, error := service.CreatePhoneToken( - "", - "+12065550100", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreatePhoneToken( + "", + "+12065550100", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md index 699cdb222e..68fd7f788d 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-recovery.md b/docs/examples/1.8.x/server-go/examples/account/create-recovery.md index 923d2819a6..5e78d01980 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-recovery.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-session.md b/docs/examples/1.8.x/server-go/examples/account/create-session.md index f5949241ff..fb0b9cbfe4 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-session.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-session.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - service := account.New(client) - response, error := service.CreateSession( - "", - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSession( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create-verification.md b/docs/examples/1.8.x/server-go/examples/account/create-verification.md index b3c7fd8004..14a1b946f3 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create-verification.md +++ b/docs/examples/1.8.x/server-go/examples/account/create-verification.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/create.md b/docs/examples/1.8.x/server-go/examples/account/create.md index dc4fdfe8f6..5e04847860 100644 --- a/docs/examples/1.8.x/server-go/examples/account/create.md +++ b/docs/examples/1.8.x/server-go/examples/account/create.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - service := account.New(client) - response, error := service.Create( - "", - "email@example.com", - "", - account.WithCreateName(""), - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "", + "email@example.com", + "", + account.WithCreateName(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-identity.md b/docs/examples/1.8.x/server-go/examples/account/delete-identity.md index 2155249894..a513991ad6 100644 --- a/docs/examples/1.8.x/server-go/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/server-go/examples/account/delete-identity.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.DeleteIdentity( - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteIdentity( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md index 0bb0b028b8..33b7e51af7 100644 --- a/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-session.md b/docs/examples/1.8.x/server-go/examples/account/delete-session.md index 3a1a9514bb..0a7bb5a856 100644 --- a/docs/examples/1.8.x/server-go/examples/account/delete-session.md +++ b/docs/examples/1.8.x/server-go/examples/account/delete-session.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.DeleteSession( - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteSession( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md index 718d149241..87c9881e06 100644 --- a/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md +++ b/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md index 31c751546f..ee955116f3 100644 --- a/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/get-prefs.md b/docs/examples/1.8.x/server-go/examples/account/get-prefs.md index 911b5786ce..c4511438ab 100644 --- a/docs/examples/1.8.x/server-go/examples/account/get-prefs.md +++ b/docs/examples/1.8.x/server-go/examples/account/get-prefs.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/get-session.md b/docs/examples/1.8.x/server-go/examples/account/get-session.md index dc42c3c12d..9005de9cf6 100644 --- a/docs/examples/1.8.x/server-go/examples/account/get-session.md +++ b/docs/examples/1.8.x/server-go/examples/account/get-session.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.GetSession( - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetSession( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/get.md b/docs/examples/1.8.x/server-go/examples/account/get.md index 80fe2da7c0..280492c77e 100644 --- a/docs/examples/1.8.x/server-go/examples/account/get.md +++ b/docs/examples/1.8.x/server-go/examples/account/get.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/list-identities.md b/docs/examples/1.8.x/server-go/examples/account/list-identities.md index 3bfa0a7b60..8114ff9e2f 100644 --- a/docs/examples/1.8.x/server-go/examples/account/list-identities.md +++ b/docs/examples/1.8.x/server-go/examples/account/list-identities.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/account/list-logs.md b/docs/examples/1.8.x/server-go/examples/account/list-logs.md index 67ee6de1c2..d72597e8d2 100644 --- a/docs/examples/1.8.x/server-go/examples/account/list-logs.md +++ b/docs/examples/1.8.x/server-go/examples/account/list-logs.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md index 8da13c72e8..f6f90f625f 100644 --- a/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/list-sessions.md b/docs/examples/1.8.x/server-go/examples/account/list-sessions.md index 96b8c10d4c..c8a408586b 100644 --- a/docs/examples/1.8.x/server-go/examples/account/list-sessions.md +++ b/docs/examples/1.8.x/server-go/examples/account/list-sessions.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-email.md b/docs/examples/1.8.x/server-go/examples/account/update-email.md index 7467080416..6defd00964 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-email.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-email.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-magic-url-session.md b/docs/examples/1.8.x/server-go/examples/account/update-magic-url-session.md index 4cda48878b..9f799c511f 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-magic-url-session.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-magic-url-session.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - service := account.New(client) - response, error := service.UpdateMagicURLSession( - "", - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMagicURLSession( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md index 4235c933b4..4999034576 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateMFAAuthenticator( - "totp", - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMFAAuthenticator( + "totp", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md index 33ad5596d3..a9dd94eab6 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateMFAChallenge( - "", - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMFAChallenge( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md index d96c43963e..fc47d3b023 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa.md index 139eea3afd..1808eed84b 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-mfa.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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, +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-name.md b/docs/examples/1.8.x/server-go/examples/account/update-name.md index 972873a17a..1cf5aa2a22 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-name.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-name.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateName( - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateName( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-password.md b/docs/examples/1.8.x/server-go/examples/account/update-password.md index aedcd0ccbc..f574679217 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-password.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-password.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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"), +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md index c937d9cd0d..5af46b840b 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") +) - service := account.New(client) - response, error := service.UpdatePhoneSession( - "", - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePhoneSession( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md index 462d98db9a..cb5a93934e 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdatePhoneVerification( - "", - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePhoneVerification( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-phone.md b/docs/examples/1.8.x/server-go/examples/account/update-phone.md index 163ecedd22..ac21bd321f 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-phone.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-phone.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-prefs.md b/docs/examples/1.8.x/server-go/examples/account/update-prefs.md index ed566ba519..94c223ff31 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-prefs.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-recovery.md b/docs/examples/1.8.x/server-go/examples/account/update-recovery.md index 0d7820bfb9..e21e5ccfdc 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-recovery.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateRecovery( - "", - "", - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateRecovery( + "", + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-session.md b/docs/examples/1.8.x/server-go/examples/account/update-session.md index 61029a7157..4984b9ef85 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-session.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-session.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateSession( - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateSession( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-status.md b/docs/examples/1.8.x/server-go/examples/account/update-status.md index 05f6449a72..e3c5d66a1d 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-status.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-status.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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()) diff --git a/docs/examples/1.8.x/server-go/examples/account/update-verification.md b/docs/examples/1.8.x/server-go/examples/account/update-verification.md index 1c781659e4..b31751746a 100644 --- a/docs/examples/1.8.x/server-go/examples/account/update-verification.md +++ b/docs/examples/1.8.x/server-go/examples/account/update-verification.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/account" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := account.New(client) - response, error := service.UpdateVerification( - "", - "", - ) +service := account.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateVerification( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md index 98f405d6dd..6b238c9f1f 100644 --- a/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/avatars" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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), +) diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md index efdfdbd5dc..4ca6feb2d9 100644 --- a/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/avatars" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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), +) diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md index 35ea339097..dafc8dd7e9 100644 --- a/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/avatars" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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", +) diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md index 3af30f3cc3..ad46317c2c 100644 --- a/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/avatars" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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), +) diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-image.md b/docs/examples/1.8.x/server-go/examples/avatars/get-image.md index f4e0324c9d..7e9a20f2f7 100644 --- a/docs/examples/1.8.x/server-go/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-image.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/avatars" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + 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), +) diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md index a7519012e2..84ddfc080a 100644 --- a/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/avatars" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := avatars.New(client) - response, error := service.GetInitials( - avatars.WithGetInitialsName(""), - 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(""), + avatars.WithGetInitialsWidth(0), + avatars.WithGetInitialsHeight(0), + avatars.WithGetInitialsBackground(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-qr.md b/docs/examples/1.8.x/server-go/examples/avatars/get-qr.md index edd84269e3..97efa7400e 100644 --- a/docs/examples/1.8.x/server-go/examples/avatars/get-qr.md +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-qr.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/avatars" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := avatars.New(client) - response, error := service.GetQR( - "", - 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( + "", + avatars.WithGetQRSize(1), + avatars.WithGetQRMargin(0), + avatars.WithGetQRDownload(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md index 43b7aff721..db87ed2d2d 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateBooleanAttribute( - "", - "", - "", - false, - databases.WithCreateBooleanAttributeDefault(false), - databases.WithCreateBooleanAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateBooleanAttribute( + "", + "", + "", + false, + databases.WithCreateBooleanAttributeDefault(false), + databases.WithCreateBooleanAttributeArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-collection.md b/docs/examples/1.8.x/server-go/examples/databases/create-collection.md index f72c4b360d..4e4e9f764c 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-collection.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateCollection( - "", - "", - "", - 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( + "", + "", + "", + databases.WithCreateCollectionPermissions(interface{}{"read("any")"}), + databases.WithCreateCollectionDocumentSecurity(false), + databases.WithCreateCollectionEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md index 7d0de22c7d..d1b5785b2e 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateDatetimeAttribute( - "", - "", - "", - false, - databases.WithCreateDatetimeAttributeDefault(""), - databases.WithCreateDatetimeAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDatetimeAttribute( + "", + "", + "", + false, + databases.WithCreateDatetimeAttributeDefault(""), + databases.WithCreateDatetimeAttributeArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-document.md b/docs/examples/1.8.x/server-go/examples/databases/create-document.md index fe96a0d601..78f0eac32c 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-document.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := databases.New(client) - response, error := service.CreateDocument( - "", - "", - "", - map[string]interface{}{}, - databases.WithCreateDocumentPermissions(interface{}{"read("any")"}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDocument( + "", + "", + "", + map[string]interface{}{}, + databases.WithCreateDocumentPermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md index 9e4da5dac7..8bd0a5761a 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateDocuments( - "", - "", - []interface{}{}, - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDocuments( + "", + "", + []interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md index 7fa28adfb0..24ceeab4ad 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateEmailAttribute( - "", - "", - "", - 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( + "", + "", + "", + false, + databases.WithCreateEmailAttributeDefault("email@example.com"), + databases.WithCreateEmailAttributeArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md index 4921e2120b..49c576a62d 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateEnumAttribute( - "", - "", - "", - []interface{}{}, - false, - databases.WithCreateEnumAttributeDefault(""), - databases.WithCreateEnumAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateEnumAttribute( + "", + "", + "", + []interface{}{}, + false, + databases.WithCreateEnumAttributeDefault(""), + databases.WithCreateEnumAttributeArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md index b933bab5e5..2a039e802e 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateFloatAttribute( - "", - "", - "", - 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( + "", + "", + "", + false, + databases.WithCreateFloatAttributeMin(0), + databases.WithCreateFloatAttributeMax(0), + databases.WithCreateFloatAttributeDefault(0), + databases.WithCreateFloatAttributeArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-index.md b/docs/examples/1.8.x/server-go/examples/databases/create-index.md index 0513490178..e2b11982d4 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-index.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-index.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateIndex( - "", - "", - "", - "key", - []interface{}{}, - databases.WithCreateIndexOrders([]interface{}{}), - databases.WithCreateIndexLengths([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateIndex( + "", + "", + "", + "key", + []interface{}{}, + databases.WithCreateIndexOrders([]interface{}{}), + databases.WithCreateIndexLengths([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md index d84771dee7..ad93ff053c 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateIntegerAttribute( - "", - "", - "", - 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( + "", + "", + "", + false, + databases.WithCreateIntegerAttributeMin(0), + databases.WithCreateIntegerAttributeMax(0), + databases.WithCreateIntegerAttributeDefault(0), + databases.WithCreateIntegerAttributeArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md index 136a7e96e8..47df16ced4 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateIpAttribute( - "", - "", - "", - false, - databases.WithCreateIpAttributeDefault(""), - databases.WithCreateIpAttributeArray(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateIpAttribute( + "", + "", + "", + false, + databases.WithCreateIpAttributeDefault(""), + databases.WithCreateIpAttributeArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md index 7fa8c9fad9..f63779ff75 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateRelationshipAttribute( - "", - "", - "", - "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( + "", + "", + "", + "oneToOne", + databases.WithCreateRelationshipAttributeTwoWay(false), + databases.WithCreateRelationshipAttributeKey(""), + databases.WithCreateRelationshipAttributeTwoWayKey(""), + databases.WithCreateRelationshipAttributeOnDelete("cascade"), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md index 25d3c1066a..4082041aaf 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateStringAttribute( - "", - "", - "", - 1, - false, - databases.WithCreateStringAttributeDefault(""), - databases.WithCreateStringAttributeArray(false), - databases.WithCreateStringAttributeEncrypt(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateStringAttribute( + "", + "", + "", + 1, + false, + databases.WithCreateStringAttributeDefault(""), + databases.WithCreateStringAttributeArray(false), + databases.WithCreateStringAttributeEncrypt(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md index dd77c93207..5b367e0cac 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.CreateUrlAttribute( - "", - "", - "", - 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( + "", + "", + "", + false, + databases.WithCreateUrlAttributeDefault("https://example.com"), + databases.WithCreateUrlAttributeArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create.md b/docs/examples/1.8.x/server-go/examples/databases/create.md index f51a5d70f3..57c8e106ed 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.Create( - "", - "", - databases.WithCreateEnabled(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "", + "", + databases.WithCreateEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md index fd4ab63aaf..af463743b5 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := databases.New(client) - response, error := service.DecrementDocumentAttribute( - "", - "", - "", - "", - databases.WithDecrementDocumentAttributeValue(0), - databases.WithDecrementDocumentAttributeMin(0), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DecrementDocumentAttribute( + "", + "", + "", + "", + databases.WithDecrementDocumentAttributeValue(0), + databases.WithDecrementDocumentAttributeMin(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md index c34c83a6a5..9640983294 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.DeleteAttribute( - "", - "", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteAttribute( + "", + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md index 01e7710c26..df3031640b 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.DeleteCollection( - "", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteCollection( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-document.md b/docs/examples/1.8.x/server-go/examples/databases/delete-document.md index 1fc4092ac6..6e9b58a56d 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-document.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := databases.New(client) - response, error := service.DeleteDocument( - "", - "", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteDocument( + "", + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md index fe018b1bbf..43e0d4cb36 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.DeleteDocuments( - "", - "", - databases.WithDeleteDocumentsQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteDocuments( + "", + "", + databases.WithDeleteDocumentsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-index.md b/docs/examples/1.8.x/server-go/examples/databases/delete-index.md index 07bbb6f80c..229c50ca36 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/delete-index.md +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-index.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.DeleteIndex( - "", - "", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteIndex( + "", + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete.md b/docs/examples/1.8.x/server-go/examples/databases/delete.md index 60995b66f0..eb7999ccb2 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/delete.md +++ b/docs/examples/1.8.x/server-go/examples/databases/delete.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.Delete( - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md index 560f34c018..e1c5d10d3c 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.GetAttribute( - "", - "", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetAttribute( + "", + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-collection.md b/docs/examples/1.8.x/server-go/examples/databases/get-collection.md index 75de4c6882..2827eec74d 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/get-collection.md +++ b/docs/examples/1.8.x/server-go/examples/databases/get-collection.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.GetCollection( - "", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetCollection( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-document.md b/docs/examples/1.8.x/server-go/examples/databases/get-document.md index 8bdd26c351..5e63077aac 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/get-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/get-document.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := databases.New(client) - response, error := service.GetDocument( - "", - "", - "", - databases.WithGetDocumentQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDocument( + "", + "", + "", + databases.WithGetDocumentQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-index.md b/docs/examples/1.8.x/server-go/examples/databases/get-index.md index ef38678361..54d5705211 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/get-index.md +++ b/docs/examples/1.8.x/server-go/examples/databases/get-index.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.GetIndex( - "", - "", - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetIndex( + "", + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/get.md b/docs/examples/1.8.x/server-go/examples/databases/get.md index 0d1eb87a29..c92506cf57 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/get.md +++ b/docs/examples/1.8.x/server-go/examples/databases/get.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.Get( - "", - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md index 0ea0312151..d2e91ee4c1 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := databases.New(client) - response, error := service.IncrementDocumentAttribute( - "", - "", - "", - "", - databases.WithIncrementDocumentAttributeValue(0), - databases.WithIncrementDocumentAttributeMax(0), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.IncrementDocumentAttribute( + "", + "", + "", + "", + databases.WithIncrementDocumentAttributeValue(0), + databases.WithIncrementDocumentAttributeMax(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md index e4748c6f90..061e43bb05 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md +++ b/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.ListAttributes( - "", - "", - databases.WithListAttributesQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListAttributes( + "", + "", + databases.WithListAttributesQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-collections.md b/docs/examples/1.8.x/server-go/examples/databases/list-collections.md index 91716dc40e..2926768f0b 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/list-collections.md +++ b/docs/examples/1.8.x/server-go/examples/databases/list-collections.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.ListCollections( - "", - databases.WithListCollectionsQueries([]interface{}{}), - databases.WithListCollectionsSearch(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCollections( + "", + databases.WithListCollectionsQueries([]interface{}{}), + databases.WithListCollectionsSearch(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-documents.md b/docs/examples/1.8.x/server-go/examples/databases/list-documents.md index 91d0408efc..0aaef36c59 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/list-documents.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := databases.New(client) - response, error := service.ListDocuments( - "", - "", - databases.WithListDocumentsQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListDocuments( + "", + "", + databases.WithListDocumentsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md index a5af8d2847..c26fbc8e7f 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md +++ b/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.ListIndexes( - "", - "", - databases.WithListIndexesQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListIndexes( + "", + "", + databases.WithListIndexesQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/list.md b/docs/examples/1.8.x/server-go/examples/databases/list.md index f377c11df0..657d3b6b78 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/list.md +++ b/docs/examples/1.8.x/server-go/examples/databases/list.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.List( - databases.WithListQueries([]interface{}{}), - databases.WithListSearch(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + databases.WithListQueries([]interface{}{}), + databases.WithListSearch(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md index 87e16a0e01..bf854b0440 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateBooleanAttribute( - "", - "", - "", - false, - false, - databases.WithUpdateBooleanAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateBooleanAttribute( + "", + "", + "", + false, + false, + databases.WithUpdateBooleanAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-collection.md b/docs/examples/1.8.x/server-go/examples/databases/update-collection.md index 07077ff0c0..4bafd5eb2c 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-collection.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateCollection( - "", - "", - "", - 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( + "", + "", + "", + databases.WithUpdateCollectionPermissions(interface{}{"read("any")"}), + databases.WithUpdateCollectionDocumentSecurity(false), + databases.WithUpdateCollectionEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md index 24017ff8b4..d78d1b879c 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateDatetimeAttribute( - "", - "", - "", - false, - "", - databases.WithUpdateDatetimeAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDatetimeAttribute( + "", + "", + "", + false, + "", + databases.WithUpdateDatetimeAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-document.md b/docs/examples/1.8.x/server-go/examples/databases/update-document.md index b36c9694db..90c0947536 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-document.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := databases.New(client) - response, error := service.UpdateDocument( - "", - "", - "", - 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( + "", + "", + "", + databases.WithUpdateDocumentData(map[string]interface{}{}), + databases.WithUpdateDocumentPermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-documents.md b/docs/examples/1.8.x/server-go/examples/databases/update-documents.md index e1b2a95bc9..7caee918e4 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-documents.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateDocuments( - "", - "", - databases.WithUpdateDocumentsData(map[string]interface{}{}), - databases.WithUpdateDocumentsQueries([]interface{}{}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDocuments( + "", + "", + databases.WithUpdateDocumentsData(map[string]interface{}{}), + databases.WithUpdateDocumentsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md index e58ac912be..728bbd7ac9 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateEmailAttribute( - "", - "", - "", - false, - "email@example.com", - databases.WithUpdateEmailAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEmailAttribute( + "", + "", + "", + false, + "email@example.com", + databases.WithUpdateEmailAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md index ea6ef4b5f8..86a5ea087e 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateEnumAttribute( - "", - "", - "", - []interface{}{}, - false, - "", - databases.WithUpdateEnumAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEnumAttribute( + "", + "", + "", + []interface{}{}, + false, + "", + databases.WithUpdateEnumAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md index db0915a5e2..9dd04e7731 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateFloatAttribute( - "", - "", - "", - 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( + "", + "", + "", + false, + 0, + databases.WithUpdateFloatAttributeMin(0), + databases.WithUpdateFloatAttributeMax(0), + databases.WithUpdateFloatAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md index ac956b61bc..b9d8bf162d 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateIntegerAttribute( - "", - "", - "", - 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( + "", + "", + "", + false, + 0, + databases.WithUpdateIntegerAttributeMin(0), + databases.WithUpdateIntegerAttributeMax(0), + databases.WithUpdateIntegerAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md index faaefd7180..fd1cfcc52d 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateIpAttribute( - "", - "", - "", - false, - "", - databases.WithUpdateIpAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateIpAttribute( + "", + "", + "", + false, + "", + databases.WithUpdateIpAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md index db8057a728..0c9ee73f8b 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateRelationshipAttribute( - "", - "", - "", - databases.WithUpdateRelationshipAttributeOnDelete("cascade"), - databases.WithUpdateRelationshipAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateRelationshipAttribute( + "", + "", + "", + databases.WithUpdateRelationshipAttributeOnDelete("cascade"), + databases.WithUpdateRelationshipAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md index f9876a2305..0d131001fc 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateStringAttribute( - "", - "", - "", - false, - "", - databases.WithUpdateStringAttributeSize(1), - databases.WithUpdateStringAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateStringAttribute( + "", + "", + "", + false, + "", + databases.WithUpdateStringAttributeSize(1), + databases.WithUpdateStringAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md index d97cf205ef..56dfbf03e3 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpdateUrlAttribute( - "", - "", - "", - false, - "https://example.com", - databases.WithUpdateUrlAttributeNewKey(""), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateUrlAttribute( + "", + "", + "", + false, + "https://example.com", + databases.WithUpdateUrlAttributeNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/update.md b/docs/examples/1.8.x/server-go/examples/databases/update.md index c7fd49fcec..49d85eba08 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/update.md +++ b/docs/examples/1.8.x/server-go/examples/databases/update.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.Update( - "", - "", - databases.WithUpdateEnabled(false), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Update( + "", + "", + databases.WithUpdateEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md index e6241b9198..00cf8ad408 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := databases.New(client) - response, error := service.UpsertDocument( - "", - "", - "", - map[string]interface{}{}, - databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}), - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpsertDocument( + "", + "", + "", + map[string]interface{}{}, + databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md index d2731cd128..a81ee4446e 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/databases" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := databases.New(client) - response, error := service.UpsertDocuments( - "", - "", - []interface{}{}, - ) +service := databases.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpsertDocuments( + "", + "", + []interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md index 53cdbf2038..86eda6f07b 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.CreateDeployment( - "", - file.NewInputFile("/path/to/file.png", "file.png"), - false, - functions.WithCreateDeploymentEntrypoint(""), - functions.WithCreateDeploymentCommands(""), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDeployment( + "", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + functions.WithCreateDeploymentEntrypoint(""), + functions.WithCreateDeploymentCommands(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md index 367ebd723d..8c01a9e305 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.CreateDuplicateDeployment( - "", - "", - functions.WithCreateDuplicateDeploymentBuildId(""), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDuplicateDeployment( + "", + "", + functions.WithCreateDuplicateDeploymentBuildId(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md index bc839e422e..1f723b8027 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := functions.New(client) - response, error := service.CreateExecution( - "", - functions.WithCreateExecutionBody(""), - functions.WithCreateExecutionAsync(false), - functions.WithCreateExecutionPath(""), - functions.WithCreateExecutionMethod("GET"), - functions.WithCreateExecutionHeaders(map[string]interface{}{}), - functions.WithCreateExecutionScheduledAt(""), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateExecution( + "", + functions.WithCreateExecutionBody(""), + functions.WithCreateExecutionAsync(false), + functions.WithCreateExecutionPath(""), + functions.WithCreateExecutionMethod("GET"), + functions.WithCreateExecutionHeaders(map[string]interface{}{}), + functions.WithCreateExecutionScheduledAt(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md index 87940ce5d4..14f694ba4a 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.CreateTemplateDeployment( - "", - "", - "", - "", - "", - functions.WithCreateTemplateDeploymentActivate(false), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTemplateDeployment( + "", + "", + "", + "", + "", + functions.WithCreateTemplateDeploymentActivate(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-variable.md b/docs/examples/1.8.x/server-go/examples/functions/create-variable.md index 68e4b7728e..84b68b834e 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create-variable.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create-variable.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.CreateVariable( - "", - "", - "", - functions.WithCreateVariableSecret(false), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVariable( + "", + "", + "", + functions.WithCreateVariableSecret(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md index 76d98acd56..5ccb045569 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.CreateVcsDeployment( - "", - "branch", - "", - functions.WithCreateVcsDeploymentActivate(false), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVcsDeployment( + "", + "branch", + "", + functions.WithCreateVcsDeploymentActivate(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/create.md b/docs/examples/1.8.x/server-go/examples/functions/create.md index 63dc01c556..5bacf3ce34 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create.md @@ -6,38 +6,31 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.Create( - "", - "", - "node-14.5", - functions.WithCreateExecute(interface{}{"any"}), - functions.WithCreateEvents([]interface{}{}), - functions.WithCreateSchedule(""), - functions.WithCreateTimeout(1), - functions.WithCreateEnabled(false), - functions.WithCreateLogging(false), - functions.WithCreateEntrypoint(""), - functions.WithCreateCommands(""), - functions.WithCreateScopes([]interface{}{}), - functions.WithCreateInstallationId(""), - functions.WithCreateProviderRepositoryId(""), - functions.WithCreateProviderBranch(""), - functions.WithCreateProviderSilentMode(false), - functions.WithCreateProviderRootDirectory(""), - functions.WithCreateSpecification(""), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "", + "", + "node-14.5", + functions.WithCreateExecute(interface{}{"any"}), + functions.WithCreateEvents([]interface{}{}), + functions.WithCreateSchedule(""), + functions.WithCreateTimeout(1), + functions.WithCreateEnabled(false), + functions.WithCreateLogging(false), + functions.WithCreateEntrypoint(""), + functions.WithCreateCommands(""), + functions.WithCreateScopes([]interface{}{}), + functions.WithCreateInstallationId(""), + functions.WithCreateProviderRepositoryId(""), + functions.WithCreateProviderBranch(""), + functions.WithCreateProviderSilentMode(false), + functions.WithCreateProviderRootDirectory(""), + functions.WithCreateSpecification(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md index 1763878c91..297c433652 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.DeleteDeployment( - "", - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteDeployment( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md index 045f24ff1d..493488cfbc 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md +++ b/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.DeleteExecution( - "", - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteExecution( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md index cbc3cdd57e..049afed8a2 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md +++ b/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.DeleteVariable( - "", - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteVariable( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete.md b/docs/examples/1.8.x/server-go/examples/functions/delete.md index 87bddcc6f3..fe2a02d87c 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/delete.md +++ b/docs/examples/1.8.x/server-go/examples/functions/delete.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.Delete( - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md index 226537bc68..26f14512b3 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md +++ b/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.GetDeploymentDownload( - "", - "", - functions.WithGetDeploymentDownloadType("source"), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDeploymentDownload( + "", + "", + functions.WithGetDeploymentDownloadType("source"), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md index d94d1a187a..f05bfd737a 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.GetDeployment( - "", - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDeployment( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-execution.md b/docs/examples/1.8.x/server-go/examples/functions/get-execution.md index 739af771ee..5fa2a32edf 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/server-go/examples/functions/get-execution.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := functions.New(client) - response, error := service.GetExecution( - "", - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetExecution( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-variable.md b/docs/examples/1.8.x/server-go/examples/functions/get-variable.md index f96c84ced3..78916740aa 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/get-variable.md +++ b/docs/examples/1.8.x/server-go/examples/functions/get-variable.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.GetVariable( - "", - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetVariable( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/get.md b/docs/examples/1.8.x/server-go/examples/functions/get.md index bfa5333e41..91e21e4eec 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/get.md +++ b/docs/examples/1.8.x/server-go/examples/functions/get.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.Get( - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md index 8d040ce546..af00c765c8 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md +++ b/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.ListDeployments( - "", - functions.WithListDeploymentsQueries([]interface{}{}), - functions.WithListDeploymentsSearch(""), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListDeployments( + "", + functions.WithListDeploymentsQueries([]interface{}{}), + functions.WithListDeploymentsSearch(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-executions.md b/docs/examples/1.8.x/server-go/examples/functions/list-executions.md index aa7e551c90..8cb902f353 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/server-go/examples/functions/list-executions.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := functions.New(client) - response, error := service.ListExecutions( - "", - functions.WithListExecutionsQueries([]interface{}{}), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListExecutions( + "", + functions.WithListExecutionsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md index 4e251247d3..c40a08f149 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md +++ b/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.ListRuntimes( - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListRuntimes()) diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md index 9b554b1cde..c0a29fc3ea 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md +++ b/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.ListSpecifications( - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSpecifications()) diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-variables.md b/docs/examples/1.8.x/server-go/examples/functions/list-variables.md index 68df7f8aa2..e71f01704b 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/list-variables.md +++ b/docs/examples/1.8.x/server-go/examples/functions/list-variables.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.ListVariables( - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListVariables( + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/list.md b/docs/examples/1.8.x/server-go/examples/functions/list.md index bff9229c08..8d7b5c9bf0 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/list.md +++ b/docs/examples/1.8.x/server-go/examples/functions/list.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.List( - functions.WithListQueries([]interface{}{}), - functions.WithListSearch(""), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + functions.WithListQueries([]interface{}{}), + functions.WithListSearch(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md index 75dce2fe74..f29be75500 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md +++ b/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.UpdateDeploymentStatus( - "", - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDeploymentStatus( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md index e8a1c8b2af..9e85be96b4 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.UpdateFunctionDeployment( - "", - "", - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateFunctionDeployment( + "", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/update-variable.md b/docs/examples/1.8.x/server-go/examples/functions/update-variable.md index 658540d027..aad017d81c 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/update-variable.md +++ b/docs/examples/1.8.x/server-go/examples/functions/update-variable.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.UpdateVariable( - "", - "", - "", - functions.WithUpdateVariableValue(""), - functions.WithUpdateVariableSecret(false), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateVariable( + "", + "", + "", + functions.WithUpdateVariableValue(""), + functions.WithUpdateVariableSecret(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/functions/update.md b/docs/examples/1.8.x/server-go/examples/functions/update.md index 7c2771efc8..1e652489f0 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/update.md +++ b/docs/examples/1.8.x/server-go/examples/functions/update.md @@ -6,38 +6,31 @@ import ( "github.com/appwrite/sdk-for-go/functions" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := functions.New(client) - response, error := service.Update( - "", - "", - functions.WithUpdateRuntime("node-14.5"), - functions.WithUpdateExecute(interface{}{"any"}), - functions.WithUpdateEvents([]interface{}{}), - functions.WithUpdateSchedule(""), - functions.WithUpdateTimeout(1), - functions.WithUpdateEnabled(false), - functions.WithUpdateLogging(false), - functions.WithUpdateEntrypoint(""), - functions.WithUpdateCommands(""), - functions.WithUpdateScopes([]interface{}{}), - functions.WithUpdateInstallationId(""), - functions.WithUpdateProviderRepositoryId(""), - functions.WithUpdateProviderBranch(""), - functions.WithUpdateProviderSilentMode(false), - functions.WithUpdateProviderRootDirectory(""), - functions.WithUpdateSpecification(""), - ) +service := functions.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Update( + "", + "", + functions.WithUpdateRuntime("node-14.5"), + functions.WithUpdateExecute(interface{}{"any"}), + functions.WithUpdateEvents([]interface{}{}), + functions.WithUpdateSchedule(""), + functions.WithUpdateTimeout(1), + functions.WithUpdateEnabled(false), + functions.WithUpdateLogging(false), + functions.WithUpdateEntrypoint(""), + functions.WithUpdateCommands(""), + functions.WithUpdateScopes([]interface{}{}), + functions.WithUpdateInstallationId(""), + functions.WithUpdateProviderRepositoryId(""), + functions.WithUpdateProviderBranch(""), + functions.WithUpdateProviderSilentMode(false), + functions.WithUpdateProviderRootDirectory(""), + functions.WithUpdateSpecification(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/graphql/mutation.md b/docs/examples/1.8.x/server-go/examples/graphql/mutation.md index 12ac4aeae1..04d9d58fe7 100644 --- a/docs/examples/1.8.x/server-go/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/server-go/examples/graphql/mutation.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/graphql" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := graphql.New(client) - response, error := service.Mutation( - map[string]interface{}{}, - ) +service := graphql.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Mutation( + map[string]interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/graphql/query.md b/docs/examples/1.8.x/server-go/examples/graphql/query.md index ff67e5e30f..05699ad881 100644 --- a/docs/examples/1.8.x/server-go/examples/graphql/query.md +++ b/docs/examples/1.8.x/server-go/examples/graphql/query.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/graphql" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := graphql.New(client) - response, error := service.Query( - map[string]interface{}{}, - ) +service := graphql.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Query( + map[string]interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md index ee880a756c..0d7ffcecb5 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetAntivirus( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetAntivirus()) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-cache.md b/docs/examples/1.8.x/server-go/examples/health/get-cache.md index 976a5b5a50..1d4dd1aa68 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-cache.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-cache.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetCache( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetCache()) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-certificate.md b/docs/examples/1.8.x/server-go/examples/health/get-certificate.md index 03cbbc190e..3590e97c0e 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-certificate.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-certificate.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetCertificate( - health.WithGetCertificateDomain(""), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetCertificate( + health.WithGetCertificateDomain(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-db.md b/docs/examples/1.8.x/server-go/examples/health/get-db.md index 2ab86d11c0..293e8666cd 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-db.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-db.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetDB( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDB()) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md index 59d8baffca..7dfcc5edc8 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetFailedJobs( - "v1-database", - health.WithGetFailedJobsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFailedJobs( + "v1-database", + health.WithGetFailedJobsThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md index 451c47c806..998de3891a 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetPubSub( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetPubSub()) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md index e3a16fb1ae..4f41ee574b 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueBuilds( - health.WithGetQueueBuildsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueBuilds( + health.WithGetQueueBuildsThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md index 42505bfc25..1cb06f49e6 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueCertificates( - health.WithGetQueueCertificatesThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueCertificates( + health.WithGetQueueCertificatesThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md index 1f1d3669fa..51ad2d8e0f 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueDatabases( - health.WithGetQueueDatabasesName(""), - health.WithGetQueueDatabasesThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueDatabases( + health.WithGetQueueDatabasesName(""), + health.WithGetQueueDatabasesThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md index 83c40caa4c..97ac4d2a0b 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueDeletes( - health.WithGetQueueDeletesThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueDeletes( + health.WithGetQueueDeletesThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md index d79f07e313..56c7517b44 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueFunctions( - health.WithGetQueueFunctionsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueFunctions( + health.WithGetQueueFunctionsThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md index b67123f8f8..76952a3167 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueLogs( - health.WithGetQueueLogsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueLogs( + health.WithGetQueueLogsThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md index efbdfe48bb..3d85dda4f3 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueMails( - health.WithGetQueueMailsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueMails( + health.WithGetQueueMailsThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md index 65c167fc18..db8a90345d 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueMessaging( - health.WithGetQueueMessagingThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueMessaging( + health.WithGetQueueMessagingThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md index 8a009960b1..ae5c524662 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueMigrations( - health.WithGetQueueMigrationsThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueMigrations( + health.WithGetQueueMigrationsThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md index ba3c71317a..28de62a3e1 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueStatsResources( - health.WithGetQueueStatsResourcesThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueStatsResources( + health.WithGetQueueStatsResourcesThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md index cdc175887f..e081c077a6 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueUsage( - health.WithGetQueueUsageThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueUsage( + health.WithGetQueueUsageThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md index 06791aa229..85acb5207d 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetQueueWebhooks( - health.WithGetQueueWebhooksThreshold(0), - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetQueueWebhooks( + health.WithGetQueueWebhooksThreshold(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md index 4e88e0a555..41b5dfaab0 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetStorageLocal( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetStorageLocal()) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-storage.md b/docs/examples/1.8.x/server-go/examples/health/get-storage.md index 3ec9ed8f6d..33ad742e2c 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-storage.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-storage.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetStorage( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetStorage()) diff --git a/docs/examples/1.8.x/server-go/examples/health/get-time.md b/docs/examples/1.8.x/server-go/examples/health/get-time.md index 323746e93d..f995ad9ddc 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get-time.md +++ b/docs/examples/1.8.x/server-go/examples/health/get-time.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.GetTime( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetTime()) diff --git a/docs/examples/1.8.x/server-go/examples/health/get.md b/docs/examples/1.8.x/server-go/examples/health/get.md index 50443c9430..da7e86a80d 100644 --- a/docs/examples/1.8.x/server-go/examples/health/get.md +++ b/docs/examples/1.8.x/server-go/examples/health/get.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/health" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := health.New(client) - response, error := service.Get( - ) +service := health.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get()) diff --git a/docs/examples/1.8.x/server-go/examples/locale/get.md b/docs/examples/1.8.x/server-go/examples/locale/get.md index 801df85bb4..87a4513d51 100644 --- a/docs/examples/1.8.x/server-go/examples/locale/get.md +++ b/docs/examples/1.8.x/server-go/examples/locale/get.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/locale" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := locale.New(client) - response, error := service.Get( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get()) diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-codes.md b/docs/examples/1.8.x/server-go/examples/locale/list-codes.md index 6625746b8a..b204a13b07 100644 --- a/docs/examples/1.8.x/server-go/examples/locale/list-codes.md +++ b/docs/examples/1.8.x/server-go/examples/locale/list-codes.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/locale" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListCodes( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCodes()) diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-continents.md b/docs/examples/1.8.x/server-go/examples/locale/list-continents.md index f6e05db3c5..4db9555f5e 100644 --- a/docs/examples/1.8.x/server-go/examples/locale/list-continents.md +++ b/docs/examples/1.8.x/server-go/examples/locale/list-continents.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/locale" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListContinents( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListContinents()) diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-countries-eu.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries-eu.md index 9f85161f1e..e46c9235c9 100644 --- a/docs/examples/1.8.x/server-go/examples/locale/list-countries-eu.md +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries-eu.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/locale" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListCountriesEU( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCountriesEU()) diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md index e7438be997..301d94db2a 100644 --- a/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/locale" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListCountriesPhones( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCountriesPhones()) diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-countries.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries.md index 5f00e6bca5..b598adbbe0 100644 --- a/docs/examples/1.8.x/server-go/examples/locale/list-countries.md +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/locale" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListCountries( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCountries()) diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md index 6971eb12ec..5046497987 100644 --- a/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md +++ b/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/locale" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListCurrencies( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListCurrencies()) diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-languages.md b/docs/examples/1.8.x/server-go/examples/locale/list-languages.md index 23bb409a61..2737401b59 100644 --- a/docs/examples/1.8.x/server-go/examples/locale/list-languages.md +++ b/docs/examples/1.8.x/server-go/examples/locale/list-languages.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/locale" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithSession("") // The user session to authenticate with - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) - service := locale.New(client) - response, error := service.ListLanguages( - ) +service := locale.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListLanguages()) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md index 477b86546b..ae9a95eba4 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := messaging.New(client) - response, error := service.CreateAPNSProvider( - "", - "", - messaging.WithCreateAPNSProviderAuthKey(""), - messaging.WithCreateAPNSProviderAuthKeyId(""), - messaging.WithCreateAPNSProviderTeamId(""), - messaging.WithCreateAPNSProviderBundleId(""), - messaging.WithCreateAPNSProviderSandbox(false), - messaging.WithCreateAPNSProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateAPNSProvider( + "", + "", + messaging.WithCreateAPNSProviderAuthKey(""), + messaging.WithCreateAPNSProviderAuthKeyId(""), + messaging.WithCreateAPNSProviderTeamId(""), + messaging.WithCreateAPNSProviderBundleId(""), + messaging.WithCreateAPNSProviderSandbox(false), + messaging.WithCreateAPNSProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-email.md b/docs/examples/1.8.x/server-go/examples/messaging/create-email.md index 9915ae1398..2c9a09a396 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-email.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-email.md @@ -6,32 +6,25 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := messaging.New(client) - response, error := service.CreateEmail( - "", - "", - "", - messaging.WithCreateEmailTopics([]interface{}{}), - messaging.WithCreateEmailUsers([]interface{}{}), - messaging.WithCreateEmailTargets([]interface{}{}), - messaging.WithCreateEmailCc([]interface{}{}), - messaging.WithCreateEmailBcc([]interface{}{}), - messaging.WithCreateEmailAttachments([]interface{}{}), - messaging.WithCreateEmailDraft(false), - messaging.WithCreateEmailHtml(false), - messaging.WithCreateEmailScheduledAt(""), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateEmail( + "", + "", + "", + messaging.WithCreateEmailTopics([]interface{}{}), + messaging.WithCreateEmailUsers([]interface{}{}), + messaging.WithCreateEmailTargets([]interface{}{}), + messaging.WithCreateEmailCc([]interface{}{}), + messaging.WithCreateEmailBcc([]interface{}{}), + messaging.WithCreateEmailAttachments([]interface{}{}), + messaging.WithCreateEmailDraft(false), + messaging.WithCreateEmailHtml(false), + messaging.WithCreateEmailScheduledAt(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md index 01e18d11c6..dd6733bc0d 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := messaging.New(client) - response, error := service.CreateFCMProvider( - "", - "", - messaging.WithCreateFCMProviderServiceAccountJSON(map[string]interface{}{}), - messaging.WithCreateFCMProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateFCMProvider( + "", + "", + messaging.WithCreateFCMProviderServiceAccountJSON(map[string]interface{}{}), + messaging.WithCreateFCMProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md index 655cdbf4c3..cbeefd4ebf 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md @@ -6,30 +6,23 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := messaging.New(client) - response, error := service.CreateMailgunProvider( - "", - "", - messaging.WithCreateMailgunProviderApiKey(""), - messaging.WithCreateMailgunProviderDomain(""), - messaging.WithCreateMailgunProviderIsEuRegion(false), - messaging.WithCreateMailgunProviderFromName(""), - messaging.WithCreateMailgunProviderFromEmail("email@example.com"), - messaging.WithCreateMailgunProviderReplyToName(""), - messaging.WithCreateMailgunProviderReplyToEmail("email@example.com"), - messaging.WithCreateMailgunProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateMailgunProvider( + "", + "", + messaging.WithCreateMailgunProviderApiKey(""), + messaging.WithCreateMailgunProviderDomain(""), + messaging.WithCreateMailgunProviderIsEuRegion(false), + messaging.WithCreateMailgunProviderFromName(""), + messaging.WithCreateMailgunProviderFromEmail("email@example.com"), + messaging.WithCreateMailgunProviderReplyToName(""), + messaging.WithCreateMailgunProviderReplyToEmail("email@example.com"), + messaging.WithCreateMailgunProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-msg-91-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-msg-91-provider.md index 85c17ff242..3cc3f90cdf 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-msg-91-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-msg-91-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := messaging.New(client) - response, error := service.CreateMsg91Provider( - "", - "", - messaging.WithCreateMsg91ProviderTemplateId(""), - messaging.WithCreateMsg91ProviderSenderId(""), - messaging.WithCreateMsg91ProviderAuthKey(""), - messaging.WithCreateMsg91ProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateMsg91Provider( + "", + "", + messaging.WithCreateMsg91ProviderTemplateId(""), + messaging.WithCreateMsg91ProviderSenderId(""), + messaging.WithCreateMsg91ProviderAuthKey(""), + messaging.WithCreateMsg91ProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-push.md b/docs/examples/1.8.x/server-go/examples/messaging/create-push.md index 86bd58bab6..fe2371bacd 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-push.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-push.md @@ -6,39 +6,32 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -func main() { - client := client.New( - client.WithEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("") // Your project ID - client.WithKey("") // Your secret API key - ) +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) - service := messaging.New(client) - response, error := service.CreatePush( - "", - messaging.WithCreatePushTitle(""), - messaging.WithCreatePushBody("<BODY>"), - messaging.WithCreatePushTopics([]interface{}{}), - messaging.WithCreatePushUsers([]interface{}{}), - messaging.WithCreatePushTargets([]interface{}{}), - messaging.WithCreatePushData(map[string]interface{}{}), - messaging.WithCreatePushAction("<ACTION>"), - messaging.WithCreatePushImage("[ID1:ID2]"), - messaging.WithCreatePushIcon("<ICON>"), - messaging.WithCreatePushSound("<SOUND>"), - messaging.WithCreatePushColor("<COLOR>"), - messaging.WithCreatePushTag("<TAG>"), - messaging.WithCreatePushBadge(0), - messaging.WithCreatePushDraft(false), - messaging.WithCreatePushScheduledAt(""), - messaging.WithCreatePushContentAvailable(false), - messaging.WithCreatePushCritical(false), - messaging.WithCreatePushPriority("normal"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreatePush( + "<MESSAGE_ID>", + messaging.WithCreatePushTitle("<TITLE>"), + messaging.WithCreatePushBody("<BODY>"), + messaging.WithCreatePushTopics([]interface{}{}), + messaging.WithCreatePushUsers([]interface{}{}), + messaging.WithCreatePushTargets([]interface{}{}), + messaging.WithCreatePushData(map[string]interface{}{}), + messaging.WithCreatePushAction("<ACTION>"), + messaging.WithCreatePushImage("[ID1:ID2]"), + messaging.WithCreatePushIcon("<ICON>"), + messaging.WithCreatePushSound("<SOUND>"), + messaging.WithCreatePushColor("<COLOR>"), + messaging.WithCreatePushTag("<TAG>"), + messaging.WithCreatePushBadge(0), + messaging.WithCreatePushDraft(false), + messaging.WithCreatePushScheduledAt(""), + messaging.WithCreatePushContentAvailable(false), + messaging.WithCreatePushCritical(false), + messaging.WithCreatePushPriority("normal"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md index 5bc3bd3e9b..c2a6787711 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.CreateSendgridProvider( - "<PROVIDER_ID>", - "<NAME>", - messaging.WithCreateSendgridProviderApiKey("<API_KEY>"), - messaging.WithCreateSendgridProviderFromName("<FROM_NAME>"), - messaging.WithCreateSendgridProviderFromEmail("email@example.com"), - messaging.WithCreateSendgridProviderReplyToName("<REPLY_TO_NAME>"), - messaging.WithCreateSendgridProviderReplyToEmail("email@example.com"), - messaging.WithCreateSendgridProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSendgridProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateSendgridProviderApiKey("<API_KEY>"), + messaging.WithCreateSendgridProviderFromName("<FROM_NAME>"), + messaging.WithCreateSendgridProviderFromEmail("email@example.com"), + messaging.WithCreateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateSendgridProviderReplyToEmail("email@example.com"), + messaging.WithCreateSendgridProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md index d22316017a..cb7d62e49c 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.CreateSMS( - "<MESSAGE_ID>", - "<CONTENT>", - messaging.WithCreateSMSTopics([]interface{}{}), - messaging.WithCreateSMSUsers([]interface{}{}), - messaging.WithCreateSMSTargets([]interface{}{}), - messaging.WithCreateSMSDraft(false), - messaging.WithCreateSMSScheduledAt(""), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSMS( + "<MESSAGE_ID>", + "<CONTENT>", + messaging.WithCreateSMSTopics([]interface{}{}), + messaging.WithCreateSMSUsers([]interface{}{}), + messaging.WithCreateSMSTargets([]interface{}{}), + messaging.WithCreateSMSDraft(false), + messaging.WithCreateSMSScheduledAt(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md index 8eb41ad2da..c469aa57e8 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md @@ -6,34 +6,27 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.CreateSMTPProvider( - "<PROVIDER_ID>", - "<NAME>", - "<HOST>", - messaging.WithCreateSMTPProviderPort(1), - messaging.WithCreateSMTPProviderUsername("<USERNAME>"), - messaging.WithCreateSMTPProviderPassword("<PASSWORD>"), - messaging.WithCreateSMTPProviderEncryption("none"), - messaging.WithCreateSMTPProviderAutoTLS(false), - messaging.WithCreateSMTPProviderMailer("<MAILER>"), - messaging.WithCreateSMTPProviderFromName("<FROM_NAME>"), - messaging.WithCreateSMTPProviderFromEmail("email@example.com"), - messaging.WithCreateSMTPProviderReplyToName("<REPLY_TO_NAME>"), - messaging.WithCreateSMTPProviderReplyToEmail("email@example.com"), - messaging.WithCreateSMTPProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSMTPProvider( + "<PROVIDER_ID>", + "<NAME>", + "<HOST>", + messaging.WithCreateSMTPProviderPort(1), + messaging.WithCreateSMTPProviderUsername("<USERNAME>"), + messaging.WithCreateSMTPProviderPassword("<PASSWORD>"), + messaging.WithCreateSMTPProviderEncryption("none"), + messaging.WithCreateSMTPProviderAutoTLS(false), + messaging.WithCreateSMTPProviderMailer("<MAILER>"), + messaging.WithCreateSMTPProviderFromName("<FROM_NAME>"), + messaging.WithCreateSMTPProviderFromEmail("email@example.com"), + messaging.WithCreateSMTPProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateSMTPProviderReplyToEmail("email@example.com"), + messaging.WithCreateSMTPProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md index 71a46d1cb2..ebc0f6bb39 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithJWT("<YOUR_JWT>") +) - service := messaging.New(client) - response, error := service.CreateSubscriber( - "<TOPIC_ID>", - "<SUBSCRIBER_ID>", - "<TARGET_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + "<TARGET_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md index e5afce8a43..4605ad3713 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.CreateTelesignProvider( - "<PROVIDER_ID>", - "<NAME>", - messaging.WithCreateTelesignProviderFrom("+12065550100"), - messaging.WithCreateTelesignProviderCustomerId("<CUSTOMER_ID>"), - messaging.WithCreateTelesignProviderApiKey("<API_KEY>"), - messaging.WithCreateTelesignProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTelesignProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTelesignProviderFrom("+12065550100"), + messaging.WithCreateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithCreateTelesignProviderApiKey("<API_KEY>"), + messaging.WithCreateTelesignProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md index 8e36b21dd3..2101fab661 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.CreateTextmagicProvider( - "<PROVIDER_ID>", - "<NAME>", - messaging.WithCreateTextmagicProviderFrom("+12065550100"), - messaging.WithCreateTextmagicProviderUsername("<USERNAME>"), - messaging.WithCreateTextmagicProviderApiKey("<API_KEY>"), - messaging.WithCreateTextmagicProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTextmagicProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTextmagicProviderFrom("+12065550100"), + messaging.WithCreateTextmagicProviderUsername("<USERNAME>"), + messaging.WithCreateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithCreateTextmagicProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md index 9ded515cf2..71814b8d86 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.CreateTopic( - "<TOPIC_ID>", - "<NAME>", - messaging.WithCreateTopicSubscribe(interface{}{"any"}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTopic( + "<TOPIC_ID>", + "<NAME>", + messaging.WithCreateTopicSubscribe(interface{}{"any"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md index 1a5d4c79b3..931a2538fa 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.CreateTwilioProvider( - "<PROVIDER_ID>", - "<NAME>", - messaging.WithCreateTwilioProviderFrom("+12065550100"), - messaging.WithCreateTwilioProviderAccountSid("<ACCOUNT_SID>"), - messaging.WithCreateTwilioProviderAuthToken("<AUTH_TOKEN>"), - messaging.WithCreateTwilioProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTwilioProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTwilioProviderFrom("+12065550100"), + messaging.WithCreateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithCreateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithCreateTwilioProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md index 10d72a2a5b..6ef3576137 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.CreateVonageProvider( - "<PROVIDER_ID>", - "<NAME>", - messaging.WithCreateVonageProviderFrom("+12065550100"), - messaging.WithCreateVonageProviderApiKey("<API_KEY>"), - messaging.WithCreateVonageProviderApiSecret("<API_SECRET>"), - messaging.WithCreateVonageProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVonageProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateVonageProviderFrom("+12065550100"), + messaging.WithCreateVonageProviderApiKey("<API_KEY>"), + messaging.WithCreateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithCreateVonageProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md index 1b492df4a2..f2a07bbb3c 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.DeleteProvider( - "<PROVIDER_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteProvider( + "<PROVIDER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md index 8bdbc6c26b..dd8b9889ae 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token - ) +client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") + client.WithProject("<YOUR_PROJECT_ID>") + client.WithJWT("<YOUR_JWT>") +) - service := messaging.New(client) - response, error := service.DeleteSubscriber( - "<TOPIC_ID>", - "<SUBSCRIBER_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md index 4bfc03f504..7ebf870539 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.DeleteTopic( - "<TOPIC_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteTopic( + "<TOPIC_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete.md b/docs/examples/1.8.x/server-go/examples/messaging/delete.md index da0cc65cec..f8400c6993 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/delete.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.Delete( - "<MESSAGE_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<MESSAGE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-message.md b/docs/examples/1.8.x/server-go/examples/messaging/get-message.md index 0273ce7373..ff1b8fa05b 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/get-message.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-message.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.GetMessage( - "<MESSAGE_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetMessage( + "<MESSAGE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md index f3736147ea..34781802bf 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.GetProvider( - "<PROVIDER_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetProvider( + "<PROVIDER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md index da46b98e6e..7774204ca6 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.GetSubscriber( - "<TOPIC_ID>", - "<SUBSCRIBER_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md index 005acefe3d..2f258be446 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.GetTopic( - "<TOPIC_ID>", - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetTopic( + "<TOPIC_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md index 2af8b23fc8..aeb6c12f98 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.ListMessageLogs( - "<MESSAGE_ID>", - messaging.WithListMessageLogsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMessageLogs( + "<MESSAGE_ID>", + messaging.WithListMessageLogsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md index afc5646f02..595072eb74 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.ListMessages( - messaging.WithListMessagesQueries([]interface{}{}), - messaging.WithListMessagesSearch("<SEARCH>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMessages( + messaging.WithListMessagesQueries([]interface{}{}), + messaging.WithListMessagesSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md index 665916c968..8f6ddc07b4 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.ListProviderLogs( - "<PROVIDER_ID>", - messaging.WithListProviderLogsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListProviderLogs( + "<PROVIDER_ID>", + messaging.WithListProviderLogsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md index 20c23231b2..2fbde76d7a 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.ListProviders( - messaging.WithListProvidersQueries([]interface{}{}), - messaging.WithListProvidersSearch("<SEARCH>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListProviders( + messaging.WithListProvidersQueries([]interface{}{}), + messaging.WithListProvidersSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md index b794781ad1..d08a1706b4 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.ListSubscriberLogs( - "<SUBSCRIBER_ID>", - messaging.WithListSubscriberLogsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSubscriberLogs( + "<SUBSCRIBER_ID>", + messaging.WithListSubscriberLogsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md index 98c63eb0b6..40fb7c1f07 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.ListSubscribers( - "<TOPIC_ID>", - messaging.WithListSubscribersQueries([]interface{}{}), - messaging.WithListSubscribersSearch("<SEARCH>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSubscribers( + "<TOPIC_ID>", + messaging.WithListSubscribersQueries([]interface{}{}), + messaging.WithListSubscribersSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md index 3df399eab3..16d9828499 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.ListTargets( - "<MESSAGE_ID>", - messaging.WithListTargetsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListTargets( + "<MESSAGE_ID>", + messaging.WithListTargetsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md index d972c202ed..e147de400a 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.ListTopicLogs( - "<TOPIC_ID>", - messaging.WithListTopicLogsQueries([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListTopicLogs( + "<TOPIC_ID>", + messaging.WithListTopicLogsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md index ca9dba1528..e507de7da8 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.ListTopics( - messaging.WithListTopicsQueries([]interface{}{}), - messaging.WithListTopicsSearch("<SEARCH>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListTopics( + messaging.WithListTopicsQueries([]interface{}{}), + messaging.WithListTopicsSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md index 1cf307bd78..f8c12e88ad 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateAPNSProvider( - "<PROVIDER_ID>", - messaging.WithUpdateAPNSProviderName("<NAME>"), - messaging.WithUpdateAPNSProviderEnabled(false), - messaging.WithUpdateAPNSProviderAuthKey("<AUTH_KEY>"), - messaging.WithUpdateAPNSProviderAuthKeyId("<AUTH_KEY_ID>"), - messaging.WithUpdateAPNSProviderTeamId("<TEAM_ID>"), - messaging.WithUpdateAPNSProviderBundleId("<BUNDLE_ID>"), - messaging.WithUpdateAPNSProviderSandbox(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateAPNSProvider( + "<PROVIDER_ID>", + messaging.WithUpdateAPNSProviderName("<NAME>"), + messaging.WithUpdateAPNSProviderEnabled(false), + messaging.WithUpdateAPNSProviderAuthKey("<AUTH_KEY>"), + messaging.WithUpdateAPNSProviderAuthKeyId("<AUTH_KEY_ID>"), + messaging.WithUpdateAPNSProviderTeamId("<TEAM_ID>"), + messaging.WithUpdateAPNSProviderBundleId("<BUNDLE_ID>"), + messaging.WithUpdateAPNSProviderSandbox(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-email.md b/docs/examples/1.8.x/server-go/examples/messaging/update-email.md index 7dd06e3ea2..91d6ad900f 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-email.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-email.md @@ -6,32 +6,25 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateEmail( - "<MESSAGE_ID>", - messaging.WithUpdateEmailTopics([]interface{}{}), - messaging.WithUpdateEmailUsers([]interface{}{}), - messaging.WithUpdateEmailTargets([]interface{}{}), - messaging.WithUpdateEmailSubject("<SUBJECT>"), - messaging.WithUpdateEmailContent("<CONTENT>"), - messaging.WithUpdateEmailDraft(false), - messaging.WithUpdateEmailHtml(false), - messaging.WithUpdateEmailCc([]interface{}{}), - messaging.WithUpdateEmailBcc([]interface{}{}), - messaging.WithUpdateEmailScheduledAt(""), - messaging.WithUpdateEmailAttachments([]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEmail( + "<MESSAGE_ID>", + messaging.WithUpdateEmailTopics([]interface{}{}), + messaging.WithUpdateEmailUsers([]interface{}{}), + messaging.WithUpdateEmailTargets([]interface{}{}), + messaging.WithUpdateEmailSubject("<SUBJECT>"), + messaging.WithUpdateEmailContent("<CONTENT>"), + messaging.WithUpdateEmailDraft(false), + messaging.WithUpdateEmailHtml(false), + messaging.WithUpdateEmailCc([]interface{}{}), + messaging.WithUpdateEmailBcc([]interface{}{}), + messaging.WithUpdateEmailScheduledAt(""), + messaging.WithUpdateEmailAttachments([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md index 3f9d615fa9..28fd91534b 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateFCMProvider( - "<PROVIDER_ID>", - messaging.WithUpdateFCMProviderName("<NAME>"), - messaging.WithUpdateFCMProviderEnabled(false), - messaging.WithUpdateFCMProviderServiceAccountJSON(map[string]interface{}{}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateFCMProvider( + "<PROVIDER_ID>", + messaging.WithUpdateFCMProviderName("<NAME>"), + messaging.WithUpdateFCMProviderEnabled(false), + messaging.WithUpdateFCMProviderServiceAccountJSON(map[string]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md index 80f078b056..d5f17b3d25 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md @@ -6,30 +6,23 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateMailgunProvider( - "<PROVIDER_ID>", - messaging.WithUpdateMailgunProviderName("<NAME>"), - messaging.WithUpdateMailgunProviderApiKey("<API_KEY>"), - messaging.WithUpdateMailgunProviderDomain("<DOMAIN>"), - messaging.WithUpdateMailgunProviderIsEuRegion(false), - messaging.WithUpdateMailgunProviderEnabled(false), - messaging.WithUpdateMailgunProviderFromName("<FROM_NAME>"), - messaging.WithUpdateMailgunProviderFromEmail("email@example.com"), - messaging.WithUpdateMailgunProviderReplyToName("<REPLY_TO_NAME>"), - messaging.WithUpdateMailgunProviderReplyToEmail("<REPLY_TO_EMAIL>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMailgunProvider( + "<PROVIDER_ID>", + messaging.WithUpdateMailgunProviderName("<NAME>"), + messaging.WithUpdateMailgunProviderApiKey("<API_KEY>"), + messaging.WithUpdateMailgunProviderDomain("<DOMAIN>"), + messaging.WithUpdateMailgunProviderIsEuRegion(false), + messaging.WithUpdateMailgunProviderEnabled(false), + messaging.WithUpdateMailgunProviderFromName("<FROM_NAME>"), + messaging.WithUpdateMailgunProviderFromEmail("email@example.com"), + messaging.WithUpdateMailgunProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateMailgunProviderReplyToEmail("<REPLY_TO_EMAIL>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-msg-91-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-msg-91-provider.md index 70dbad455b..825d2d4940 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-msg-91-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-msg-91-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateMsg91Provider( - "<PROVIDER_ID>", - messaging.WithUpdateMsg91ProviderName("<NAME>"), - messaging.WithUpdateMsg91ProviderEnabled(false), - messaging.WithUpdateMsg91ProviderTemplateId("<TEMPLATE_ID>"), - messaging.WithUpdateMsg91ProviderSenderId("<SENDER_ID>"), - messaging.WithUpdateMsg91ProviderAuthKey("<AUTH_KEY>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMsg91Provider( + "<PROVIDER_ID>", + messaging.WithUpdateMsg91ProviderName("<NAME>"), + messaging.WithUpdateMsg91ProviderEnabled(false), + messaging.WithUpdateMsg91ProviderTemplateId("<TEMPLATE_ID>"), + messaging.WithUpdateMsg91ProviderSenderId("<SENDER_ID>"), + messaging.WithUpdateMsg91ProviderAuthKey("<AUTH_KEY>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-push.md b/docs/examples/1.8.x/server-go/examples/messaging/update-push.md index e68bd77311..190627fa43 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-push.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-push.md @@ -6,39 +6,32 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdatePush( - "<MESSAGE_ID>", - messaging.WithUpdatePushTopics([]interface{}{}), - messaging.WithUpdatePushUsers([]interface{}{}), - messaging.WithUpdatePushTargets([]interface{}{}), - messaging.WithUpdatePushTitle("<TITLE>"), - messaging.WithUpdatePushBody("<BODY>"), - messaging.WithUpdatePushData(map[string]interface{}{}), - messaging.WithUpdatePushAction("<ACTION>"), - messaging.WithUpdatePushImage("[ID1:ID2]"), - messaging.WithUpdatePushIcon("<ICON>"), - messaging.WithUpdatePushSound("<SOUND>"), - messaging.WithUpdatePushColor("<COLOR>"), - messaging.WithUpdatePushTag("<TAG>"), - messaging.WithUpdatePushBadge(0), - messaging.WithUpdatePushDraft(false), - messaging.WithUpdatePushScheduledAt(""), - messaging.WithUpdatePushContentAvailable(false), - messaging.WithUpdatePushCritical(false), - messaging.WithUpdatePushPriority("normal"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePush( + "<MESSAGE_ID>", + messaging.WithUpdatePushTopics([]interface{}{}), + messaging.WithUpdatePushUsers([]interface{}{}), + messaging.WithUpdatePushTargets([]interface{}{}), + messaging.WithUpdatePushTitle("<TITLE>"), + messaging.WithUpdatePushBody("<BODY>"), + messaging.WithUpdatePushData(map[string]interface{}{}), + messaging.WithUpdatePushAction("<ACTION>"), + messaging.WithUpdatePushImage("[ID1:ID2]"), + messaging.WithUpdatePushIcon("<ICON>"), + messaging.WithUpdatePushSound("<SOUND>"), + messaging.WithUpdatePushColor("<COLOR>"), + messaging.WithUpdatePushTag("<TAG>"), + messaging.WithUpdatePushBadge(0), + messaging.WithUpdatePushDraft(false), + messaging.WithUpdatePushScheduledAt(""), + messaging.WithUpdatePushContentAvailable(false), + messaging.WithUpdatePushCritical(false), + messaging.WithUpdatePushPriority("normal"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md index 9c442e26e5..4a9f822c58 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateSendgridProvider( - "<PROVIDER_ID>", - messaging.WithUpdateSendgridProviderName("<NAME>"), - messaging.WithUpdateSendgridProviderEnabled(false), - messaging.WithUpdateSendgridProviderApiKey("<API_KEY>"), - messaging.WithUpdateSendgridProviderFromName("<FROM_NAME>"), - messaging.WithUpdateSendgridProviderFromEmail("email@example.com"), - messaging.WithUpdateSendgridProviderReplyToName("<REPLY_TO_NAME>"), - messaging.WithUpdateSendgridProviderReplyToEmail("<REPLY_TO_EMAIL>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateSendgridProvider( + "<PROVIDER_ID>", + messaging.WithUpdateSendgridProviderName("<NAME>"), + messaging.WithUpdateSendgridProviderEnabled(false), + messaging.WithUpdateSendgridProviderApiKey("<API_KEY>"), + messaging.WithUpdateSendgridProviderFromName("<FROM_NAME>"), + messaging.WithUpdateSendgridProviderFromEmail("email@example.com"), + messaging.WithUpdateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateSendgridProviderReplyToEmail("<REPLY_TO_EMAIL>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md index 3c57e872a1..988de20082 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateSMS( - "<MESSAGE_ID>", - messaging.WithUpdateSMSTopics([]interface{}{}), - messaging.WithUpdateSMSUsers([]interface{}{}), - messaging.WithUpdateSMSTargets([]interface{}{}), - messaging.WithUpdateSMSContent("<CONTENT>"), - messaging.WithUpdateSMSDraft(false), - messaging.WithUpdateSMSScheduledAt(""), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateSMS( + "<MESSAGE_ID>", + messaging.WithUpdateSMSTopics([]interface{}{}), + messaging.WithUpdateSMSUsers([]interface{}{}), + messaging.WithUpdateSMSTargets([]interface{}{}), + messaging.WithUpdateSMSContent("<CONTENT>"), + messaging.WithUpdateSMSDraft(false), + messaging.WithUpdateSMSScheduledAt(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md index 61c961bb96..1519750183 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md @@ -6,34 +6,27 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateSMTPProvider( - "<PROVIDER_ID>", - messaging.WithUpdateSMTPProviderName("<NAME>"), - messaging.WithUpdateSMTPProviderHost("<HOST>"), - messaging.WithUpdateSMTPProviderPort(1), - messaging.WithUpdateSMTPProviderUsername("<USERNAME>"), - messaging.WithUpdateSMTPProviderPassword("<PASSWORD>"), - messaging.WithUpdateSMTPProviderEncryption("none"), - messaging.WithUpdateSMTPProviderAutoTLS(false), - messaging.WithUpdateSMTPProviderMailer("<MAILER>"), - messaging.WithUpdateSMTPProviderFromName("<FROM_NAME>"), - messaging.WithUpdateSMTPProviderFromEmail("email@example.com"), - messaging.WithUpdateSMTPProviderReplyToName("<REPLY_TO_NAME>"), - messaging.WithUpdateSMTPProviderReplyToEmail("<REPLY_TO_EMAIL>"), - messaging.WithUpdateSMTPProviderEnabled(false), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateSMTPProvider( + "<PROVIDER_ID>", + messaging.WithUpdateSMTPProviderName("<NAME>"), + messaging.WithUpdateSMTPProviderHost("<HOST>"), + messaging.WithUpdateSMTPProviderPort(1), + messaging.WithUpdateSMTPProviderUsername("<USERNAME>"), + messaging.WithUpdateSMTPProviderPassword("<PASSWORD>"), + messaging.WithUpdateSMTPProviderEncryption("none"), + messaging.WithUpdateSMTPProviderAutoTLS(false), + messaging.WithUpdateSMTPProviderMailer("<MAILER>"), + messaging.WithUpdateSMTPProviderFromName("<FROM_NAME>"), + messaging.WithUpdateSMTPProviderFromEmail("email@example.com"), + messaging.WithUpdateSMTPProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateSMTPProviderReplyToEmail("<REPLY_TO_EMAIL>"), + messaging.WithUpdateSMTPProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md index 77549380c8..d00c6b6eb1 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateTelesignProvider( - "<PROVIDER_ID>", - messaging.WithUpdateTelesignProviderName("<NAME>"), - messaging.WithUpdateTelesignProviderEnabled(false), - messaging.WithUpdateTelesignProviderCustomerId("<CUSTOMER_ID>"), - messaging.WithUpdateTelesignProviderApiKey("<API_KEY>"), - messaging.WithUpdateTelesignProviderFrom("<FROM>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTelesignProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTelesignProviderName("<NAME>"), + messaging.WithUpdateTelesignProviderEnabled(false), + messaging.WithUpdateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithUpdateTelesignProviderApiKey("<API_KEY>"), + messaging.WithUpdateTelesignProviderFrom("<FROM>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md index 55350f7a1e..38e1bed245 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateTextmagicProvider( - "<PROVIDER_ID>", - messaging.WithUpdateTextmagicProviderName("<NAME>"), - messaging.WithUpdateTextmagicProviderEnabled(false), - messaging.WithUpdateTextmagicProviderUsername("<USERNAME>"), - messaging.WithUpdateTextmagicProviderApiKey("<API_KEY>"), - messaging.WithUpdateTextmagicProviderFrom("<FROM>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTextmagicProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTextmagicProviderName("<NAME>"), + messaging.WithUpdateTextmagicProviderEnabled(false), + messaging.WithUpdateTextmagicProviderUsername("<USERNAME>"), + messaging.WithUpdateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithUpdateTextmagicProviderFrom("<FROM>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md index a83b5e4852..f7c0044bc3 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateTopic( - "<TOPIC_ID>", - messaging.WithUpdateTopicName("<NAME>"), - messaging.WithUpdateTopicSubscribe(interface{}{"any"}), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTopic( + "<TOPIC_ID>", + messaging.WithUpdateTopicName("<NAME>"), + messaging.WithUpdateTopicSubscribe(interface{}{"any"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md index 61b95dabf1..644d6d87d5 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateTwilioProvider( - "<PROVIDER_ID>", - messaging.WithUpdateTwilioProviderName("<NAME>"), - messaging.WithUpdateTwilioProviderEnabled(false), - messaging.WithUpdateTwilioProviderAccountSid("<ACCOUNT_SID>"), - messaging.WithUpdateTwilioProviderAuthToken("<AUTH_TOKEN>"), - messaging.WithUpdateTwilioProviderFrom("<FROM>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTwilioProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTwilioProviderName("<NAME>"), + messaging.WithUpdateTwilioProviderEnabled(false), + messaging.WithUpdateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithUpdateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithUpdateTwilioProviderFrom("<FROM>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md index 4cfc03c2b5..01ebeb3334 100644 --- a/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/messaging" ) -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 := messaging.New(client) - response, error := service.UpdateVonageProvider( - "<PROVIDER_ID>", - messaging.WithUpdateVonageProviderName("<NAME>"), - messaging.WithUpdateVonageProviderEnabled(false), - messaging.WithUpdateVonageProviderApiKey("<API_KEY>"), - messaging.WithUpdateVonageProviderApiSecret("<API_SECRET>"), - messaging.WithUpdateVonageProviderFrom("<FROM>"), - ) +service := messaging.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateVonageProvider( + "<PROVIDER_ID>", + messaging.WithUpdateVonageProviderName("<NAME>"), + messaging.WithUpdateVonageProviderEnabled(false), + messaging.WithUpdateVonageProviderApiKey("<API_KEY>"), + messaging.WithUpdateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithUpdateVonageProviderFrom("<FROM>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md index 5a13b3e152..1c85372388 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.CreateDeployment( - "<SITE_ID>", - file.NewInputFile("/path/to/file.png", "file.png"), - false, - sites.WithCreateDeploymentInstallCommand("<INSTALL_COMMAND>"), - sites.WithCreateDeploymentBuildCommand("<BUILD_COMMAND>"), - sites.WithCreateDeploymentOutputDirectory("<OUTPUT_DIRECTORY>"), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDeployment( + "<SITE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + sites.WithCreateDeploymentInstallCommand("<INSTALL_COMMAND>"), + sites.WithCreateDeploymentBuildCommand("<BUILD_COMMAND>"), + sites.WithCreateDeploymentOutputDirectory("<OUTPUT_DIRECTORY>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md index 84b4932b36..177dc48b57 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.CreateDuplicateDeployment( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDuplicateDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md index b67f65f6c9..483d3e79ff 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.CreateTemplateDeployment( - "<SITE_ID>", - "<REPOSITORY>", - "<OWNER>", - "<ROOT_DIRECTORY>", - "<VERSION>", - sites.WithCreateTemplateDeploymentActivate(false), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTemplateDeployment( + "<SITE_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "<VERSION>", + sites.WithCreateTemplateDeploymentActivate(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-variable.md b/docs/examples/1.8.x/server-go/examples/sites/create-variable.md index 05148190e9..7681f0d561 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/create-variable.md +++ b/docs/examples/1.8.x/server-go/examples/sites/create-variable.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.CreateVariable( - "<SITE_ID>", - "<KEY>", - "<VALUE>", - sites.WithCreateVariableSecret(false), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVariable( + "<SITE_ID>", + "<KEY>", + "<VALUE>", + sites.WithCreateVariableSecret(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md index c13edc5900..2e39147d6b 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.CreateVcsDeployment( - "<SITE_ID>", - "branch", - "<REFERENCE>", - sites.WithCreateVcsDeploymentActivate(false), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateVcsDeployment( + "<SITE_ID>", + "branch", + "<REFERENCE>", + sites.WithCreateVcsDeploymentActivate(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/create.md b/docs/examples/1.8.x/server-go/examples/sites/create.md index f87a3068a2..e011baf92c 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/create.md +++ b/docs/examples/1.8.x/server-go/examples/sites/create.md @@ -6,38 +6,31 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.Create( - "<SITE_ID>", - "<NAME>", - "analog", - "node-14.5", - sites.WithCreateEnabled(false), - sites.WithCreateLogging(false), - sites.WithCreateTimeout(1), - sites.WithCreateInstallCommand("<INSTALL_COMMAND>"), - sites.WithCreateBuildCommand("<BUILD_COMMAND>"), - sites.WithCreateOutputDirectory("<OUTPUT_DIRECTORY>"), - sites.WithCreateAdapter("static"), - sites.WithCreateInstallationId("<INSTALLATION_ID>"), - sites.WithCreateFallbackFile("<FALLBACK_FILE>"), - sites.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), - sites.WithCreateProviderBranch("<PROVIDER_BRANCH>"), - sites.WithCreateProviderSilentMode(false), - sites.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), - sites.WithCreateSpecification(""), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "<SITE_ID>", + "<NAME>", + "analog", + "node-14.5", + sites.WithCreateEnabled(false), + sites.WithCreateLogging(false), + sites.WithCreateTimeout(1), + sites.WithCreateInstallCommand("<INSTALL_COMMAND>"), + sites.WithCreateBuildCommand("<BUILD_COMMAND>"), + sites.WithCreateOutputDirectory("<OUTPUT_DIRECTORY>"), + sites.WithCreateAdapter("static"), + sites.WithCreateInstallationId("<INSTALLATION_ID>"), + sites.WithCreateFallbackFile("<FALLBACK_FILE>"), + sites.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + sites.WithCreateProviderBranch("<PROVIDER_BRANCH>"), + sites.WithCreateProviderSilentMode(false), + sites.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + sites.WithCreateSpecification(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md index 5e5de1a888..36d313344a 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.DeleteDeployment( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete-log.md b/docs/examples/1.8.x/server-go/examples/sites/delete-log.md index fe3add16fe..34a77611f2 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/delete-log.md +++ b/docs/examples/1.8.x/server-go/examples/sites/delete-log.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.DeleteLog( - "<SITE_ID>", - "<LOG_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteLog( + "<SITE_ID>", + "<LOG_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md index 389d454c4c..00e6c5c4f7 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md +++ b/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.DeleteVariable( - "<SITE_ID>", - "<VARIABLE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteVariable( + "<SITE_ID>", + "<VARIABLE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete.md b/docs/examples/1.8.x/server-go/examples/sites/delete.md index 184276dc4b..4a93cdb12c 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/delete.md +++ b/docs/examples/1.8.x/server-go/examples/sites/delete.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.Delete( - "<SITE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<SITE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md index a90d358073..b3f1101bc0 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md +++ b/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.GetDeploymentDownload( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - sites.WithGetDeploymentDownloadType("source"), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDeploymentDownload( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + sites.WithGetDeploymentDownloadType("source"), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md index 17d066e8fe..28f4917467 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.GetDeployment( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-log.md b/docs/examples/1.8.x/server-go/examples/sites/get-log.md index ca0031546d..1d5aacb2f0 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/get-log.md +++ b/docs/examples/1.8.x/server-go/examples/sites/get-log.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.GetLog( - "<SITE_ID>", - "<LOG_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetLog( + "<SITE_ID>", + "<LOG_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-variable.md b/docs/examples/1.8.x/server-go/examples/sites/get-variable.md index 55f8ddf6ca..91f1a0d1ea 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/get-variable.md +++ b/docs/examples/1.8.x/server-go/examples/sites/get-variable.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.GetVariable( - "<SITE_ID>", - "<VARIABLE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetVariable( + "<SITE_ID>", + "<VARIABLE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/get.md b/docs/examples/1.8.x/server-go/examples/sites/get.md index e876766da8..9c1f38da3d 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/get.md +++ b/docs/examples/1.8.x/server-go/examples/sites/get.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.Get( - "<SITE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<SITE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md index b6ab37ea79..b4dafaf145 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md +++ b/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.ListDeployments( - "<SITE_ID>", - sites.WithListDeploymentsQueries([]interface{}{}), - sites.WithListDeploymentsSearch("<SEARCH>"), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListDeployments( + "<SITE_ID>", + sites.WithListDeploymentsQueries([]interface{}{}), + sites.WithListDeploymentsSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md index dae9a1814d..d876ac1acf 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md +++ b/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.ListFrameworks( - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListFrameworks()) diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-logs.md b/docs/examples/1.8.x/server-go/examples/sites/list-logs.md index 1c756cdbb6..64b6009adc 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/list-logs.md +++ b/docs/examples/1.8.x/server-go/examples/sites/list-logs.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.ListLogs( - "<SITE_ID>", - sites.WithListLogsQueries([]interface{}{}), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListLogs( + "<SITE_ID>", + sites.WithListLogsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md index 96d74c7fc3..f3a46b225f 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md +++ b/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md @@ -6,20 +6,12 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.ListSpecifications( - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSpecifications()) diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-variables.md b/docs/examples/1.8.x/server-go/examples/sites/list-variables.md index c6d329736d..18d1e48033 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/list-variables.md +++ b/docs/examples/1.8.x/server-go/examples/sites/list-variables.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.ListVariables( - "<SITE_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListVariables( + "<SITE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/list.md b/docs/examples/1.8.x/server-go/examples/sites/list.md index e43442226a..83fea84293 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/list.md +++ b/docs/examples/1.8.x/server-go/examples/sites/list.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.List( - sites.WithListQueries([]interface{}{}), - sites.WithListSearch("<SEARCH>"), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + sites.WithListQueries([]interface{}{}), + sites.WithListSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md index 3c8cd3201d..29dad9b1f6 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md +++ b/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.UpdateDeploymentStatus( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDeploymentStatus( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md index 806fbb35a6..176d641073 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md +++ b/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.UpdateSiteDeployment( - "<SITE_ID>", - "<DEPLOYMENT_ID>", - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateSiteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/update-variable.md b/docs/examples/1.8.x/server-go/examples/sites/update-variable.md index c2f0506b44..99879be702 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/update-variable.md +++ b/docs/examples/1.8.x/server-go/examples/sites/update-variable.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.UpdateVariable( - "<SITE_ID>", - "<VARIABLE_ID>", - "<KEY>", - sites.WithUpdateVariableValue("<VALUE>"), - sites.WithUpdateVariableSecret(false), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + "<KEY>", + sites.WithUpdateVariableValue("<VALUE>"), + sites.WithUpdateVariableSecret(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/sites/update.md b/docs/examples/1.8.x/server-go/examples/sites/update.md index 3dd53e283a..fee0eb8bf6 100644 --- a/docs/examples/1.8.x/server-go/examples/sites/update.md +++ b/docs/examples/1.8.x/server-go/examples/sites/update.md @@ -6,38 +6,31 @@ import ( "github.com/appwrite/sdk-for-go/sites" ) -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 := sites.New(client) - response, error := service.Update( - "<SITE_ID>", - "<NAME>", - "analog", - sites.WithUpdateEnabled(false), - sites.WithUpdateLogging(false), - sites.WithUpdateTimeout(1), - sites.WithUpdateInstallCommand("<INSTALL_COMMAND>"), - sites.WithUpdateBuildCommand("<BUILD_COMMAND>"), - sites.WithUpdateOutputDirectory("<OUTPUT_DIRECTORY>"), - sites.WithUpdateBuildRuntime("node-14.5"), - sites.WithUpdateAdapter("static"), - sites.WithUpdateFallbackFile("<FALLBACK_FILE>"), - sites.WithUpdateInstallationId("<INSTALLATION_ID>"), - sites.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), - sites.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), - sites.WithUpdateProviderSilentMode(false), - sites.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), - sites.WithUpdateSpecification(""), - ) +service := sites.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Update( + "<SITE_ID>", + "<NAME>", + "analog", + sites.WithUpdateEnabled(false), + sites.WithUpdateLogging(false), + sites.WithUpdateTimeout(1), + sites.WithUpdateInstallCommand("<INSTALL_COMMAND>"), + sites.WithUpdateBuildCommand("<BUILD_COMMAND>"), + sites.WithUpdateOutputDirectory("<OUTPUT_DIRECTORY>"), + sites.WithUpdateBuildRuntime("node-14.5"), + sites.WithUpdateAdapter("static"), + sites.WithUpdateFallbackFile("<FALLBACK_FILE>"), + sites.WithUpdateInstallationId("<INSTALLATION_ID>"), + sites.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + sites.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), + sites.WithUpdateProviderSilentMode(false), + sites.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + sites.WithUpdateSpecification(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md index a2679d9894..64e3c40191 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md @@ -6,30 +6,23 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.CreateBucket( - "<BUCKET_ID>", - "<NAME>", - storage.WithCreateBucketPermissions(interface{}{"read("any")"}), - storage.WithCreateBucketFileSecurity(false), - storage.WithCreateBucketEnabled(false), - storage.WithCreateBucketMaximumFileSize(1), - storage.WithCreateBucketAllowedFileExtensions([]interface{}{}), - storage.WithCreateBucketCompression("none"), - storage.WithCreateBucketEncryption(false), - storage.WithCreateBucketAntivirus(false), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateBucket( + "<BUCKET_ID>", + "<NAME>", + storage.WithCreateBucketPermissions(interface{}{"read("any")"}), + storage.WithCreateBucketFileSecurity(false), + storage.WithCreateBucketEnabled(false), + storage.WithCreateBucketMaximumFileSize(1), + storage.WithCreateBucketAllowedFileExtensions([]interface{}{}), + storage.WithCreateBucketCompression("none"), + storage.WithCreateBucketEncryption(false), + storage.WithCreateBucketAntivirus(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/create-file.md b/docs/examples/1.8.x/server-go/examples/storage/create-file.md index 4d87231490..b195c66a8f 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-go/examples/storage/create-file.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.CreateFile( - "<BUCKET_ID>", - "<FILE_ID>", - file.NewInputFile("/path/to/file.png", "file.png"), - storage.WithCreateFilePermissions(interface{}{"read("any")"}), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateFile( + "<BUCKET_ID>", + "<FILE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + storage.WithCreateFilePermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md index 28832a1187..8142212a9f 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md +++ b/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.DeleteBucket( - "<BUCKET_ID>", - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteBucket( + "<BUCKET_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/delete-file.md b/docs/examples/1.8.x/server-go/examples/storage/delete-file.md index e616054107..af3f921c56 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/server-go/examples/storage/delete-file.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.DeleteFile( - "<BUCKET_ID>", - "<FILE_ID>", - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteFile( + "<BUCKET_ID>", + "<FILE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md index acb722546e..c52ebbe004 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md +++ b/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.GetBucket( - "<BUCKET_ID>", - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetBucket( + "<BUCKET_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md index c0a1724eac..bc1d7333be 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.GetFileDownload( - "<BUCKET_ID>", - "<FILE_ID>", - storage.WithGetFileDownloadToken("<TOKEN>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFileDownload( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFileDownloadToken("<TOKEN>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md index 5d7d75a4f8..956fbd191d 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md @@ -6,34 +6,27 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.GetFilePreview( - "<BUCKET_ID>", - "<FILE_ID>", - storage.WithGetFilePreviewWidth(0), - storage.WithGetFilePreviewHeight(0), - storage.WithGetFilePreviewGravity("center"), - storage.WithGetFilePreviewQuality(-1), - storage.WithGetFilePreviewBorderWidth(0), - storage.WithGetFilePreviewBorderColor(""), - storage.WithGetFilePreviewBorderRadius(0), - storage.WithGetFilePreviewOpacity(0), - storage.WithGetFilePreviewRotation(-360), - storage.WithGetFilePreviewBackground(""), - storage.WithGetFilePreviewOutput("jpg"), - storage.WithGetFilePreviewToken("<TOKEN>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFilePreview( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFilePreviewWidth(0), + storage.WithGetFilePreviewHeight(0), + storage.WithGetFilePreviewGravity("center"), + storage.WithGetFilePreviewQuality(-1), + storage.WithGetFilePreviewBorderWidth(0), + storage.WithGetFilePreviewBorderColor(""), + storage.WithGetFilePreviewBorderRadius(0), + storage.WithGetFilePreviewOpacity(0), + storage.WithGetFilePreviewRotation(-360), + storage.WithGetFilePreviewBackground(""), + storage.WithGetFilePreviewOutput("jpg"), + storage.WithGetFilePreviewToken("<TOKEN>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md index ca59105821..a2189750be 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.GetFileView( - "<BUCKET_ID>", - "<FILE_ID>", - storage.WithGetFileViewToken("<TOKEN>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFileView( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFileViewToken("<TOKEN>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file.md b/docs/examples/1.8.x/server-go/examples/storage/get-file.md index b33170e93c..383d4052da 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/get-file.md +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.GetFile( - "<BUCKET_ID>", - "<FILE_ID>", - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetFile( + "<BUCKET_ID>", + "<FILE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md index 79f4c4b3e4..3d10e6ab7f 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md +++ b/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.ListBuckets( - storage.WithListBucketsQueries([]interface{}{}), - storage.WithListBucketsSearch("<SEARCH>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListBuckets( + storage.WithListBucketsQueries([]interface{}{}), + storage.WithListBucketsSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/list-files.md b/docs/examples/1.8.x/server-go/examples/storage/list-files.md index 2c2652a97e..62a09b3f20 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/list-files.md +++ b/docs/examples/1.8.x/server-go/examples/storage/list-files.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.ListFiles( - "<BUCKET_ID>", - storage.WithListFilesQueries([]interface{}{}), - storage.WithListFilesSearch("<SEARCH>"), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListFiles( + "<BUCKET_ID>", + storage.WithListFilesQueries([]interface{}{}), + storage.WithListFilesSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md index ac28e5b649..bb5f7aa76d 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md @@ -6,30 +6,23 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.UpdateBucket( - "<BUCKET_ID>", - "<NAME>", - storage.WithUpdateBucketPermissions(interface{}{"read("any")"}), - storage.WithUpdateBucketFileSecurity(false), - storage.WithUpdateBucketEnabled(false), - storage.WithUpdateBucketMaximumFileSize(1), - storage.WithUpdateBucketAllowedFileExtensions([]interface{}{}), - storage.WithUpdateBucketCompression("none"), - storage.WithUpdateBucketEncryption(false), - storage.WithUpdateBucketAntivirus(false), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateBucket( + "<BUCKET_ID>", + "<NAME>", + storage.WithUpdateBucketPermissions(interface{}{"read("any")"}), + storage.WithUpdateBucketFileSecurity(false), + storage.WithUpdateBucketEnabled(false), + storage.WithUpdateBucketMaximumFileSize(1), + storage.WithUpdateBucketAllowedFileExtensions([]interface{}{}), + storage.WithUpdateBucketCompression("none"), + storage.WithUpdateBucketEncryption(false), + storage.WithUpdateBucketAntivirus(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/storage/update-file.md b/docs/examples/1.8.x/server-go/examples/storage/update-file.md index d6887a82c1..79a75bab4c 100644 --- a/docs/examples/1.8.x/server-go/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-go/examples/storage/update-file.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/storage" ) -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 := storage.New(client) - response, error := service.UpdateFile( - "<BUCKET_ID>", - "<FILE_ID>", - storage.WithUpdateFileName("<NAME>"), - storage.WithUpdateFilePermissions(interface{}{"read("any")"}), - ) +service := storage.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateFile( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithUpdateFileName("<NAME>"), + storage.WithUpdateFilePermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md index bc2daaf82a..6b35615487 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateBooleanColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tablesdb.WithCreateBooleanColumnDefault(false), - tablesdb.WithCreateBooleanColumnArray(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateBooleanColumnDefault(false), + tablesdb.WithCreateBooleanColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md index e16e014008..24a8aa7567 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateDatetimeColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tablesdb.WithCreateDatetimeColumnDefault(""), - tablesdb.WithCreateDatetimeColumnArray(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateDatetimeColumnDefault(""), + tablesdb.WithCreateDatetimeColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md index 9ffa9be83e..918b3785c4 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateEmailColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tablesdb.WithCreateEmailColumnDefault("email@example.com"), - tablesdb.WithCreateEmailColumnArray(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateEmailColumnDefault("email@example.com"), + tablesdb.WithCreateEmailColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md index a817007e98..9eaef4be4c 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateEnumColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - []interface{}{}, - false, - tablesdb.WithCreateEnumColumnDefault("<DEFAULT>"), - tablesdb.WithCreateEnumColumnArray(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + tablesdb.WithCreateEnumColumnDefault("<DEFAULT>"), + tablesdb.WithCreateEnumColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md index 85fe948cd8..f630565e39 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateFloatColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tablesdb.WithCreateFloatColumnMin(0), - tablesdb.WithCreateFloatColumnMax(0), - tablesdb.WithCreateFloatColumnDefault(0), - tablesdb.WithCreateFloatColumnArray(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateFloatColumnMin(0), + tablesdb.WithCreateFloatColumnMax(0), + tablesdb.WithCreateFloatColumnDefault(0), + tablesdb.WithCreateFloatColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md index a77a0ef303..fb292b9914 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - "key", - []interface{}{}, - tablesdb.WithCreateIndexOrders([]interface{}{}), - tablesdb.WithCreateIndexLengths([]interface{}{}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + "key", + []interface{}{}, + tablesdb.WithCreateIndexOrders([]interface{}{}), + tablesdb.WithCreateIndexLengths([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md index 35cf556486..a56f5eec8b 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateIntegerColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tablesdb.WithCreateIntegerColumnMin(0), - tablesdb.WithCreateIntegerColumnMax(0), - tablesdb.WithCreateIntegerColumnDefault(0), - tablesdb.WithCreateIntegerColumnArray(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateIntegerColumnMin(0), + tablesdb.WithCreateIntegerColumnMax(0), + tablesdb.WithCreateIntegerColumnDefault(0), + tablesdb.WithCreateIntegerColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md index 0df9111c66..358b4cfa4b 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateIpColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tablesdb.WithCreateIpColumnDefault(""), - tablesdb.WithCreateIpColumnArray(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateIpColumnDefault(""), + tablesdb.WithCreateIpColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md index 8b97af6e98..0423509787 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateRelationshipColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<RELATED_TABLE_ID>", - "oneToOne", - tablesdb.WithCreateRelationshipColumnTwoWay(false), - tablesdb.WithCreateRelationshipColumnKey(""), - tablesdb.WithCreateRelationshipColumnTwoWayKey(""), - tablesdb.WithCreateRelationshipColumnOnDelete("cascade"), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + "oneToOne", + tablesdb.WithCreateRelationshipColumnTwoWay(false), + tablesdb.WithCreateRelationshipColumnKey(""), + tablesdb.WithCreateRelationshipColumnTwoWayKey(""), + tablesdb.WithCreateRelationshipColumnOnDelete("cascade"), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md index fe8e0e34f5..2441fa3dd8 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - map[string]interface{}{}, - tablesdb.WithCreateRowPermissions(interface{}{"read("any")"}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + map[string]interface{}{}, + tablesdb.WithCreateRowPermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md index 8edf4913c1..2d83be06df 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateRows( - "<DATABASE_ID>", - "<TABLE_ID>", - []interface{}{}, - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md index c1025d469f..b31f583806 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateStringColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - 1, - false, - tablesdb.WithCreateStringColumnDefault("<DEFAULT>"), - tablesdb.WithCreateStringColumnArray(false), - tablesdb.WithCreateStringColumnEncrypt(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + 1, + false, + tablesdb.WithCreateStringColumnDefault("<DEFAULT>"), + tablesdb.WithCreateStringColumnArray(false), + tablesdb.WithCreateStringColumnEncrypt(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md index b3b18b2206..c454c08d6e 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateTable( - "<DATABASE_ID>", - "<TABLE_ID>", - "<NAME>", - tablesdb.WithCreateTablePermissions(interface{}{"read("any")"}), - tablesdb.WithCreateTableRowSecurity(false), - tablesdb.WithCreateTableEnabled(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tablesdb.WithCreateTablePermissions(interface{}{"read("any")"}), + tablesdb.WithCreateTableRowSecurity(false), + tablesdb.WithCreateTableEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md index f90b1d843a..55abd16818 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.CreateUrlColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tablesdb.WithCreateUrlColumnDefault("https://example.com"), - tablesdb.WithCreateUrlColumnArray(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateUrlColumnDefault("https://example.com"), + tablesdb.WithCreateUrlColumnArray(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create.md index bb1b1b85b9..d09b6aeab8 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/create.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.Create( - "<DATABASE_ID>", - "<NAME>", - tablesdb.WithCreateEnabled(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "<DATABASE_ID>", + "<NAME>", + tablesdb.WithCreateEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md index 115396aa3c..cd8d6c8983 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.DecrementRowColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - "", - tablesdb.WithDecrementRowColumnValue(0), - tablesdb.WithDecrementRowColumnMin(0), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DecrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tablesdb.WithDecrementRowColumnValue(0), + tablesdb.WithDecrementRowColumnMin(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md index a55e0d3932..475f4a4e8c 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.DeleteColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md index a5feb8b746..2c3b7759af 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.DeleteIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md index ac782c3a24..8571a54c6c 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.DeleteRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md index b117202604..364a4c942f 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.DeleteRows( - "<DATABASE_ID>", - "<TABLE_ID>", - tablesdb.WithDeleteRowsQueries([]interface{}{}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithDeleteRowsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md index ac8e4ece1b..9274fc61b5 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.DeleteTable( - "<DATABASE_ID>", - "<TABLE_ID>", - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteTable( + "<DATABASE_ID>", + "<TABLE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md index a610eed6a7..fb00bf0666 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.Delete( - "<DATABASE_ID>", - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<DATABASE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md index 977e97d94a..2cb626f921 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.GetColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md index c894630e2f..a289d5efeb 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.GetIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md index ad7a7014ab..3a555f07c5 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.GetRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - tablesdb.WithGetRowQueries([]interface{}{}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tablesdb.WithGetRowQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md index de3bd7ba62..eb42f82c16 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.GetTable( - "<DATABASE_ID>", - "<TABLE_ID>", - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetTable( + "<DATABASE_ID>", + "<TABLE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get.md index c42708f9c8..9bf18901b6 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/get.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.Get( - "<DATABASE_ID>", - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<DATABASE_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md index c7fd4da16a..d072099cc6 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.IncrementRowColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - "", - tablesdb.WithIncrementRowColumnValue(0), - tablesdb.WithIncrementRowColumnMax(0), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.IncrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tablesdb.WithIncrementRowColumnValue(0), + tablesdb.WithIncrementRowColumnMax(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md index 9f1da0e3e7..c6646c0f1d 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.ListColumns( - "<DATABASE_ID>", - "<TABLE_ID>", - tablesdb.WithListColumnsQueries([]interface{}{}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListColumns( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithListColumnsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md index 71fc7ddb08..bc13bb7488 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.ListIndexes( - "<DATABASE_ID>", - "<TABLE_ID>", - tablesdb.WithListIndexesQueries([]interface{}{}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListIndexes( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithListIndexesQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md index 2b74bb0412..34a7b6fb98 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.ListRows( - "<DATABASE_ID>", - "<TABLE_ID>", - tablesdb.WithListRowsQueries([]interface{}{}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithListRowsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md index 7f1520de8f..2029c538ee 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.ListTables( - "<DATABASE_ID>", - tablesdb.WithListTablesQueries([]interface{}{}), - tablesdb.WithListTablesSearch("<SEARCH>"), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListTables( + "<DATABASE_ID>", + tablesdb.WithListTablesQueries([]interface{}{}), + tablesdb.WithListTablesSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list.md index dfbd06d06d..99f35ae06d 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/list.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.List( - tablesdb.WithListQueries([]interface{}{}), - tablesdb.WithListSearch("<SEARCH>"), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + tablesdb.WithListQueries([]interface{}{}), + tablesdb.WithListSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md index 1d127f03a2..9b0bdd302e 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateBooleanColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - false, - tablesdb.WithUpdateBooleanColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + false, + tablesdb.WithUpdateBooleanColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md index 6e76c17f8b..9c406cae6c 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateDatetimeColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "", - tablesdb.WithUpdateDatetimeColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tablesdb.WithUpdateDatetimeColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md index d698153de3..74483f31e3 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateEmailColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "email@example.com", - tablesdb.WithUpdateEmailColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "email@example.com", + tablesdb.WithUpdateEmailColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md index 462132f3fc..f215172565 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateEnumColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - []interface{}{}, - false, - "<DEFAULT>", - tablesdb.WithUpdateEnumColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + tablesdb.WithUpdateEnumColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md index 14a676146b..9daf2c2236 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateFloatColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - 0, - tablesdb.WithUpdateFloatColumnMin(0), - tablesdb.WithUpdateFloatColumnMax(0), - tablesdb.WithUpdateFloatColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tablesdb.WithUpdateFloatColumnMin(0), + tablesdb.WithUpdateFloatColumnMax(0), + tablesdb.WithUpdateFloatColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md index da69515d7d..86a113522c 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md @@ -6,28 +6,21 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateIntegerColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - 0, - tablesdb.WithUpdateIntegerColumnMin(0), - tablesdb.WithUpdateIntegerColumnMax(0), - tablesdb.WithUpdateIntegerColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tablesdb.WithUpdateIntegerColumnMin(0), + tablesdb.WithUpdateIntegerColumnMax(0), + tablesdb.WithUpdateIntegerColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md index 1aaa70b873..1c4bdb4f96 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateIpColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "", - tablesdb.WithUpdateIpColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tablesdb.WithUpdateIpColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md index 5b3abbeee4..ed923a2d33 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateRelationshipColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - tablesdb.WithUpdateRelationshipColumnOnDelete("cascade"), - tablesdb.WithUpdateRelationshipColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + tablesdb.WithUpdateRelationshipColumnOnDelete("cascade"), + tablesdb.WithUpdateRelationshipColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md index 5230f45ad0..1e819bb589 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - tablesdb.WithUpdateRowData(map[string]interface{}{}), - tablesdb.WithUpdateRowPermissions(interface{}{"read("any")"}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tablesdb.WithUpdateRowData(map[string]interface{}{}), + tablesdb.WithUpdateRowPermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md index 4df16b851d..3541dce134 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateRows( - "<DATABASE_ID>", - "<TABLE_ID>", - tablesdb.WithUpdateRowsData(map[string]interface{}{}), - tablesdb.WithUpdateRowsQueries([]interface{}{}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithUpdateRowsData(map[string]interface{}{}), + tablesdb.WithUpdateRowsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md index 9581868437..4366602bd8 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateStringColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "<DEFAULT>", - tablesdb.WithUpdateStringColumnSize(1), - tablesdb.WithUpdateStringColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "<DEFAULT>", + tablesdb.WithUpdateStringColumnSize(1), + tablesdb.WithUpdateStringColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md index 9c1406bc07..4eb692ac14 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateTable( - "<DATABASE_ID>", - "<TABLE_ID>", - "<NAME>", - tablesdb.WithUpdateTablePermissions(interface{}{"read("any")"}), - tablesdb.WithUpdateTableRowSecurity(false), - tablesdb.WithUpdateTableEnabled(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tablesdb.WithUpdateTablePermissions(interface{}{"read("any")"}), + tablesdb.WithUpdateTableRowSecurity(false), + tablesdb.WithUpdateTableEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md index a9c32fbb2e..998d0e773f 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpdateUrlColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "https://example.com", - tablesdb.WithUpdateUrlColumnNewKey(""), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "https://example.com", + tablesdb.WithUpdateUrlColumnNewKey(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update.md index 0fd52e11c2..3ad3a0c2f5 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/update.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.Update( - "<DATABASE_ID>", - "<NAME>", - tablesdb.WithUpdateEnabled(false), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Update( + "<DATABASE_ID>", + "<NAME>", + tablesdb.WithUpdateEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md index 4e09855f3e..9fec778142 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpsertRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - tablesdb.WithUpsertRowData(map[string]interface{}{}), - tablesdb.WithUpsertRowPermissions(interface{}{"read("any")"}), - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpsertRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tablesdb.WithUpsertRowData(map[string]interface{}{}), + tablesdb.WithUpsertRowPermissions(interface{}{"read("any")"}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md index dad9e9904a..5ded736cd0 100644 --- a/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tablesdb" ) -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 := tablesdb.New(client) - response, error := service.UpsertRows( - "<DATABASE_ID>", - "<TABLE_ID>", - []interface{}{}, - ) +service := tablesdb.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpsertRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/create-membership.md b/docs/examples/1.8.x/server-go/examples/teams/create-membership.md index e6cfb8b9c8..b8a71c188e 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/server-go/examples/teams/create-membership.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.CreateMembership( - "<TEAM_ID>", - []interface{}{}, - teams.WithCreateMembershipEmail("email@example.com"), - teams.WithCreateMembershipUserId("<USER_ID>"), - teams.WithCreateMembershipPhone("+12065550100"), - teams.WithCreateMembershipUrl("https://example.com"), - teams.WithCreateMembershipName("<NAME>"), - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateMembership( + "<TEAM_ID>", + []interface{}{}, + teams.WithCreateMembershipEmail("email@example.com"), + teams.WithCreateMembershipUserId("<USER_ID>"), + teams.WithCreateMembershipPhone("+12065550100"), + teams.WithCreateMembershipUrl("https://example.com"), + teams.WithCreateMembershipName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/create.md b/docs/examples/1.8.x/server-go/examples/teams/create.md index 773da7afcd..0a0fa5aae6 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/create.md +++ b/docs/examples/1.8.x/server-go/examples/teams/create.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.Create( - "<TEAM_ID>", - "<NAME>", - teams.WithCreateRoles([]interface{}{}), - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "<TEAM_ID>", + "<NAME>", + teams.WithCreateRoles([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md index 5ffee885fb..1d9e19832d 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.DeleteMembership( - "<TEAM_ID>", - "<MEMBERSHIP_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/delete.md b/docs/examples/1.8.x/server-go/examples/teams/delete.md index c66c7056bd..8cf9892daa 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/delete.md +++ b/docs/examples/1.8.x/server-go/examples/teams/delete.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.Delete( - "<TEAM_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<TEAM_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/get-membership.md b/docs/examples/1.8.x/server-go/examples/teams/get-membership.md index 466ab72059..47d63bbb2b 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/server-go/examples/teams/get-membership.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.GetMembership( - "<TEAM_ID>", - "<MEMBERSHIP_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md index d8400e420a..fd487d2c79 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.GetPrefs( - "<TEAM_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetPrefs( + "<TEAM_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/get.md b/docs/examples/1.8.x/server-go/examples/teams/get.md index 0f503c7f5b..64dfb9b633 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/get.md +++ b/docs/examples/1.8.x/server-go/examples/teams/get.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.Get( - "<TEAM_ID>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<TEAM_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md index 90b2babcb0..0e7ea18fd3 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.ListMemberships( - "<TEAM_ID>", - teams.WithListMembershipsQueries([]interface{}{}), - teams.WithListMembershipsSearch("<SEARCH>"), - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMemberships( + "<TEAM_ID>", + teams.WithListMembershipsQueries([]interface{}{}), + teams.WithListMembershipsSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/list.md b/docs/examples/1.8.x/server-go/examples/teams/list.md index e70ca11587..579546fcc2 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/list.md +++ b/docs/examples/1.8.x/server-go/examples/teams/list.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.List( - teams.WithListQueries([]interface{}{}), - teams.WithListSearch("<SEARCH>"), - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + teams.WithListQueries([]interface{}{}), + teams.WithListSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md index c9e1215971..72bb53e065 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.UpdateMembershipStatus( - "<TEAM_ID>", - "<MEMBERSHIP_ID>", - "<USER_ID>", - "<SECRET>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMembershipStatus( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + "<USER_ID>", + "<SECRET>", +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-membership.md b/docs/examples/1.8.x/server-go/examples/teams/update-membership.md index 8721a5ed6d..4bfde07218 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/server-go/examples/teams/update-membership.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.UpdateMembership( - "<TEAM_ID>", - "<MEMBERSHIP_ID>", - []interface{}{}, - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + []interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-name.md b/docs/examples/1.8.x/server-go/examples/teams/update-name.md index 0d75a7bb32..02fba6b4bd 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/update-name.md +++ b/docs/examples/1.8.x/server-go/examples/teams/update-name.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.UpdateName( - "<TEAM_ID>", - "<NAME>", - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateName( + "<TEAM_ID>", + "<NAME>", +) diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md index e9631d5bf3..a5f44c079f 100644 --- a/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/teams" ) -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 := teams.New(client) - response, error := service.UpdatePrefs( - "<TEAM_ID>", - map[string]interface{}{}, - ) +service := teams.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePrefs( + "<TEAM_ID>", + map[string]interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md index 3109062d9e..b05e5f7e4d 100644 --- a/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md +++ b/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tokens" ) -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 := tokens.New(client) - response, error := service.CreateFileToken( - "<BUCKET_ID>", - "<FILE_ID>", - tokens.WithCreateFileTokenExpire(""), - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateFileToken( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithCreateFileTokenExpire(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/tokens/delete.md b/docs/examples/1.8.x/server-go/examples/tokens/delete.md index a376bab09b..807ba41025 100644 --- a/docs/examples/1.8.x/server-go/examples/tokens/delete.md +++ b/docs/examples/1.8.x/server-go/examples/tokens/delete.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/tokens" ) -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 := tokens.New(client) - response, error := service.Delete( - "<TOKEN_ID>", - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<TOKEN_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tokens/get.md b/docs/examples/1.8.x/server-go/examples/tokens/get.md index 4c01f68669..277e46210a 100644 --- a/docs/examples/1.8.x/server-go/examples/tokens/get.md +++ b/docs/examples/1.8.x/server-go/examples/tokens/get.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/tokens" ) -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 := tokens.New(client) - response, error := service.Get( - "<TOKEN_ID>", - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<TOKEN_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/tokens/list.md b/docs/examples/1.8.x/server-go/examples/tokens/list.md index 99876af081..7686f065e7 100644 --- a/docs/examples/1.8.x/server-go/examples/tokens/list.md +++ b/docs/examples/1.8.x/server-go/examples/tokens/list.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/tokens" ) -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 := tokens.New(client) - response, error := service.List( - "<BUCKET_ID>", - "<FILE_ID>", - tokens.WithListQueries([]interface{}{}), - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithListQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/tokens/update.md b/docs/examples/1.8.x/server-go/examples/tokens/update.md index eaba8eaafb..b4bbc5476f 100644 --- a/docs/examples/1.8.x/server-go/examples/tokens/update.md +++ b/docs/examples/1.8.x/server-go/examples/tokens/update.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/tokens" ) -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 := tokens.New(client) - response, error := service.Update( - "<TOKEN_ID>", - tokens.WithUpdateExpire(""), - ) +service := tokens.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Update( + "<TOKEN_ID>", + tokens.WithUpdateExpire(""), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-argon-2-user.md b/docs/examples/1.8.x/server-go/examples/users/create-argon-2-user.md index 28565ff01c..f5b651a1e8 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-argon-2-user.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-argon-2-user.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateArgon2User( - "<USER_ID>", - "email@example.com", - "password", - users.WithCreateArgon2UserName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateArgon2User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateArgon2UserName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md index fedf00327e..b021f96ff5 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateBcryptUser( - "<USER_ID>", - "email@example.com", - "password", - users.WithCreateBcryptUserName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateBcryptUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateBcryptUserName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-jwt.md b/docs/examples/1.8.x/server-go/examples/users/create-jwt.md index c335ab4ea1..426f832ba0 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-jwt.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-jwt.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateJWT( - "<USER_ID>", - users.WithCreateJWTSessionId("<SESSION_ID>"), - users.WithCreateJWTDuration(0), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateJWT( + "<USER_ID>", + users.WithCreateJWTSessionId("<SESSION_ID>"), + users.WithCreateJWTDuration(0), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-md-5-user.md b/docs/examples/1.8.x/server-go/examples/users/create-md-5-user.md index 369aab7ac7..0da3f6877e 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-md-5-user.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-md-5-user.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateMD5User( - "<USER_ID>", - "email@example.com", - "password", - users.WithCreateMD5UserName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateMD5User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateMD5UserName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md index bc85d3a21e..4808f63329 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateMFARecoveryCodes( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateMFARecoveryCodes( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-ph-pass-user.md b/docs/examples/1.8.x/server-go/examples/users/create-ph-pass-user.md index 2a09bec811..28e77e3749 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-ph-pass-user.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-ph-pass-user.md @@ -6,24 +6,17 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreatePHPassUser( - "<USER_ID>", - "email@example.com", - "password", - users.WithCreatePHPassUserName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreatePHPassUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreatePHPassUserName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md index f815121290..51cc11bfa3 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md @@ -6,27 +6,20 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateScryptModifiedUser( - "<USER_ID>", - "email@example.com", - "password", - "<PASSWORD_SALT>", - "<PASSWORD_SALT_SEPARATOR>", - "<PASSWORD_SIGNER_KEY>", - users.WithCreateScryptModifiedUserName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateScryptModifiedUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + "<PASSWORD_SALT_SEPARATOR>", + "<PASSWORD_SIGNER_KEY>", + users.WithCreateScryptModifiedUserName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md index f2fde655d2..a64fcfbb29 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md @@ -6,29 +6,22 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateScryptUser( - "<USER_ID>", - "email@example.com", - "password", - "<PASSWORD_SALT>", - 0, - 0, - 0, - 0, - users.WithCreateScryptUserName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateScryptUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + 0, + 0, + 0, + 0, + users.WithCreateScryptUserName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-session.md b/docs/examples/1.8.x/server-go/examples/users/create-session.md index b868319613..7bbd39de91 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-session.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-session.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateSession( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSession( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-sha-user.md b/docs/examples/1.8.x/server-go/examples/users/create-sha-user.md index 2bc05f91f9..721159851b 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-sha-user.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-sha-user.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateSHAUser( - "<USER_ID>", - "email@example.com", - "password", - users.WithCreateSHAUserPasswordVersion("sha1"), - users.WithCreateSHAUserName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateSHAUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateSHAUserPasswordVersion("sha1"), + users.WithCreateSHAUserName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-target.md b/docs/examples/1.8.x/server-go/examples/users/create-target.md index 71c449c603..8d4f2841b1 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-target.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-target.md @@ -6,26 +6,19 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateTarget( - "<USER_ID>", - "<TARGET_ID>", - "email", - "<IDENTIFIER>", - users.WithCreateTargetProviderId("<PROVIDER_ID>"), - users.WithCreateTargetName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateTarget( + "<USER_ID>", + "<TARGET_ID>", + "email", + "<IDENTIFIER>", + users.WithCreateTargetProviderId("<PROVIDER_ID>"), + users.WithCreateTargetName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create-token.md b/docs/examples/1.8.x/server-go/examples/users/create-token.md index d50c7efc28..44d96c1f70 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create-token.md +++ b/docs/examples/1.8.x/server-go/examples/users/create-token.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.CreateToken( - "<USER_ID>", - users.WithCreateTokenLength(4), - users.WithCreateTokenExpire(60), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.CreateToken( + "<USER_ID>", + users.WithCreateTokenLength(4), + users.WithCreateTokenExpire(60), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/create.md b/docs/examples/1.8.x/server-go/examples/users/create.md index 7cd8920bb2..b4d1afca6b 100644 --- a/docs/examples/1.8.x/server-go/examples/users/create.md +++ b/docs/examples/1.8.x/server-go/examples/users/create.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.Create( - "<USER_ID>", - users.WithCreateEmail("email@example.com"), - users.WithCreatePhone("+12065550100"), - users.WithCreatePassword(""), - users.WithCreateName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Create( + "<USER_ID>", + users.WithCreateEmail("email@example.com"), + users.WithCreatePhone("+12065550100"), + users.WithCreatePassword(""), + users.WithCreateName("<NAME>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-identity.md b/docs/examples/1.8.x/server-go/examples/users/delete-identity.md index f35a7917cc..14baa6607d 100644 --- a/docs/examples/1.8.x/server-go/examples/users/delete-identity.md +++ b/docs/examples/1.8.x/server-go/examples/users/delete-identity.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.DeleteIdentity( - "<IDENTITY_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteIdentity( + "<IDENTITY_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md index 812858261d..d32a5c3e31 100644 --- a/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.DeleteMFAAuthenticator( - "<USER_ID>", - "totp", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteMFAAuthenticator( + "<USER_ID>", + "totp", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-session.md b/docs/examples/1.8.x/server-go/examples/users/delete-session.md index 62f4bd5a89..3162ae92b4 100644 --- a/docs/examples/1.8.x/server-go/examples/users/delete-session.md +++ b/docs/examples/1.8.x/server-go/examples/users/delete-session.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.DeleteSession( - "<USER_ID>", - "<SESSION_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteSession( + "<USER_ID>", + "<SESSION_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md index 235b2b1e9e..8d0bbfc155 100644 --- a/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md +++ b/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.DeleteSessions( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteSessions( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-target.md b/docs/examples/1.8.x/server-go/examples/users/delete-target.md index ce942a9ead..2fa4ae910a 100644 --- a/docs/examples/1.8.x/server-go/examples/users/delete-target.md +++ b/docs/examples/1.8.x/server-go/examples/users/delete-target.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.DeleteTarget( - "<USER_ID>", - "<TARGET_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.DeleteTarget( + "<USER_ID>", + "<TARGET_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/delete.md b/docs/examples/1.8.x/server-go/examples/users/delete.md index 1654957c95..72a4122b0f 100644 --- a/docs/examples/1.8.x/server-go/examples/users/delete.md +++ b/docs/examples/1.8.x/server-go/examples/users/delete.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.Delete( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Delete( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md index 9824241724..ff24b6ff9c 100644 --- a/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.GetMFARecoveryCodes( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetMFARecoveryCodes( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/get-prefs.md b/docs/examples/1.8.x/server-go/examples/users/get-prefs.md index 4d3298fab8..e4a05d1ce3 100644 --- a/docs/examples/1.8.x/server-go/examples/users/get-prefs.md +++ b/docs/examples/1.8.x/server-go/examples/users/get-prefs.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.GetPrefs( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetPrefs( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/get-target.md b/docs/examples/1.8.x/server-go/examples/users/get-target.md index 481052d75d..b4b99c7ef7 100644 --- a/docs/examples/1.8.x/server-go/examples/users/get-target.md +++ b/docs/examples/1.8.x/server-go/examples/users/get-target.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.GetTarget( - "<USER_ID>", - "<TARGET_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.GetTarget( + "<USER_ID>", + "<TARGET_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/get.md b/docs/examples/1.8.x/server-go/examples/users/get.md index a4da4b741d..85a8440dee 100644 --- a/docs/examples/1.8.x/server-go/examples/users/get.md +++ b/docs/examples/1.8.x/server-go/examples/users/get.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.Get( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.Get( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/list-identities.md b/docs/examples/1.8.x/server-go/examples/users/list-identities.md index a9916f5fa3..047b2165f7 100644 --- a/docs/examples/1.8.x/server-go/examples/users/list-identities.md +++ b/docs/examples/1.8.x/server-go/examples/users/list-identities.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.ListIdentities( - users.WithListIdentitiesQueries([]interface{}{}), - users.WithListIdentitiesSearch("<SEARCH>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListIdentities( + users.WithListIdentitiesQueries([]interface{}{}), + users.WithListIdentitiesSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/list-logs.md b/docs/examples/1.8.x/server-go/examples/users/list-logs.md index bb36dc531c..56f3397939 100644 --- a/docs/examples/1.8.x/server-go/examples/users/list-logs.md +++ b/docs/examples/1.8.x/server-go/examples/users/list-logs.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.ListLogs( - "<USER_ID>", - users.WithListLogsQueries([]interface{}{}), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListLogs( + "<USER_ID>", + users.WithListLogsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/list-memberships.md b/docs/examples/1.8.x/server-go/examples/users/list-memberships.md index 1591603971..fd2f1329fd 100644 --- a/docs/examples/1.8.x/server-go/examples/users/list-memberships.md +++ b/docs/examples/1.8.x/server-go/examples/users/list-memberships.md @@ -6,23 +6,16 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.ListMemberships( - "<USER_ID>", - users.WithListMembershipsQueries([]interface{}{}), - users.WithListMembershipsSearch("<SEARCH>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMemberships( + "<USER_ID>", + users.WithListMembershipsQueries([]interface{}{}), + users.WithListMembershipsSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md index 3abb918307..9a3c32631d 100644 --- a/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.ListMFAFactors( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListMFAFactors( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/list-sessions.md b/docs/examples/1.8.x/server-go/examples/users/list-sessions.md index be4202400c..6b55a9a5fb 100644 --- a/docs/examples/1.8.x/server-go/examples/users/list-sessions.md +++ b/docs/examples/1.8.x/server-go/examples/users/list-sessions.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.ListSessions( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListSessions( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/list-targets.md b/docs/examples/1.8.x/server-go/examples/users/list-targets.md index ed78ade5a8..ac5ba41c97 100644 --- a/docs/examples/1.8.x/server-go/examples/users/list-targets.md +++ b/docs/examples/1.8.x/server-go/examples/users/list-targets.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.ListTargets( - "<USER_ID>", - users.WithListTargetsQueries([]interface{}{}), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.ListTargets( + "<USER_ID>", + users.WithListTargetsQueries([]interface{}{}), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/list.md b/docs/examples/1.8.x/server-go/examples/users/list.md index c74a59a7e2..cffc9793f0 100644 --- a/docs/examples/1.8.x/server-go/examples/users/list.md +++ b/docs/examples/1.8.x/server-go/examples/users/list.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.List( - users.WithListQueries([]interface{}{}), - users.WithListSearch("<SEARCH>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.List( + users.WithListQueries([]interface{}{}), + users.WithListSearch("<SEARCH>"), +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md index 411cd831c5..c2326b4c91 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdateEmailVerification( - "<USER_ID>", - false, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEmailVerification( + "<USER_ID>", + false, +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-email.md b/docs/examples/1.8.x/server-go/examples/users/update-email.md index 1e01350731..ac3938a637 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-email.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-email.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdateEmail( - "<USER_ID>", - "email@example.com", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateEmail( + "<USER_ID>", + "email@example.com", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-labels.md b/docs/examples/1.8.x/server-go/examples/users/update-labels.md index 0b735cdef5..01c37f53ac 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-labels.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-labels.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdateLabels( - "<USER_ID>", - []interface{}{}, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateLabels( + "<USER_ID>", + []interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md index 618b51678e..f79ac5c575 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md @@ -6,21 +6,14 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdateMFARecoveryCodes( - "<USER_ID>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMFARecoveryCodes( + "<USER_ID>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-mfa.md b/docs/examples/1.8.x/server-go/examples/users/update-mfa.md index 6fefa02c77..9cff007fe0 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-mfa.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-mfa.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdateMFA( - "<USER_ID>", - false, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateMFA( + "<USER_ID>", + false, +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-name.md b/docs/examples/1.8.x/server-go/examples/users/update-name.md index da9f3d5ac7..73255e25bc 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-name.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-name.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdateName( - "<USER_ID>", - "<NAME>", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateName( + "<USER_ID>", + "<NAME>", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-password.md b/docs/examples/1.8.x/server-go/examples/users/update-password.md index d09f5bb92c..5aa6e9ef6e 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-password.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-password.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdatePassword( - "<USER_ID>", - "", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePassword( + "<USER_ID>", + "", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md index fdf01898ea..e90febf7d6 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdatePhoneVerification( - "<USER_ID>", - false, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePhoneVerification( + "<USER_ID>", + false, +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-phone.md b/docs/examples/1.8.x/server-go/examples/users/update-phone.md index f4f5b5d01d..602a012a2d 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-phone.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-phone.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdatePhone( - "<USER_ID>", - "+12065550100", - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePhone( + "<USER_ID>", + "+12065550100", +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-prefs.md b/docs/examples/1.8.x/server-go/examples/users/update-prefs.md index 75cb55b868..dd607f3c42 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-prefs.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-prefs.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdatePrefs( - "<USER_ID>", - map[string]interface{}{}, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdatePrefs( + "<USER_ID>", + map[string]interface{}{}, +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-status.md b/docs/examples/1.8.x/server-go/examples/users/update-status.md index 964ed3bf92..f93dde9c39 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-status.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-status.md @@ -6,22 +6,15 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdateStatus( - "<USER_ID>", - false, - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateStatus( + "<USER_ID>", + false, +) diff --git a/docs/examples/1.8.x/server-go/examples/users/update-target.md b/docs/examples/1.8.x/server-go/examples/users/update-target.md index 2c1ab3b71e..82f3d65de4 100644 --- a/docs/examples/1.8.x/server-go/examples/users/update-target.md +++ b/docs/examples/1.8.x/server-go/examples/users/update-target.md @@ -6,25 +6,18 @@ import ( "github.com/appwrite/sdk-for-go/users" ) -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 := users.New(client) - response, error := service.UpdateTarget( - "<USER_ID>", - "<TARGET_ID>", - users.WithUpdateTargetIdentifier("<IDENTIFIER>"), - users.WithUpdateTargetProviderId("<PROVIDER_ID>"), - users.WithUpdateTargetName("<NAME>"), - ) +service := users.New(client) - if error != nil { - panic(error) - } - - fmt.Println(response) -} +response, error := service.UpdateTarget( + "<USER_ID>", + "<TARGET_ID>", + users.WithUpdateTargetIdentifier("<IDENTIFIER>"), + users.WithUpdateTargetProviderId("<PROVIDER_ID>"), + users.WithUpdateTargetName("<NAME>"), +) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index 163e39b7ba..110ec99a9d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -58,7 +58,7 @@ class Create extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tablesDB.createDatabase', + replaceWith: 'tablesDB.create', ) ) ])