mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
update: generate docs examples as per latest 1.8.x source.
This commit is contained in:
1 parent
c7a3ffdb71
commit
974037ee38
6235 files changed
+96496
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Functions;
|
||||
|
||||
Client client = new Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.setKey("<YOUR_API_KEY>"); // Your secret API key
|
||||
|
||||
Functions functions = new Functions(client);
|
||||
|
||||
functions.createVariable(
|
||||
"<FUNCTION_ID>", // functionId
|
||||
"<KEY>", // key
|
||||
"<VALUE>", // value
|
||||
false, // secret (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println(result);
|
||||
})
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user