mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
update: generate docs examples as per latest 1.8.x source.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
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
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.updateStringAttribute(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<COLLECTION_ID>", // collectionId
|
||||
"", // key
|
||||
false, // required
|
||||
"<DEFAULT>", // default
|
||||
1, // size (optional)
|
||||
"", // newKey (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println(result);
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user