mirror of
https://github.com/appwrite/appwrite
synced 2026-05-16 05:28:31 +00:00
612 B
612 B
package main
import ( "fmt" "github.com/appwrite/sdk-for-go/client" "github.com/appwrite/sdk-for-go/functions" )
func main() { client := client.NewClient()
client.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
client.SetKey("<YOUR_API_KEY>") // Your secret API key
service := functions.NewFunctions(client)
response, error := service.CreateVariable(
"<FUNCTION_ID>",
"<KEY>",
"<VALUE>",
)
if error != nil {
panic(error)
}
fmt.Println(response)
}