2024-07-03 15:25:40 +00:00
|
|
|
require 'appwrite'
|
|
|
|
|
|
|
|
|
|
include Appwrite
|
|
|
|
|
|
|
|
|
|
client = Client.new
|
|
|
|
|
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
2024-08-21 10:53:05 +00:00
|
|
|
.set_project('<YOUR_PROJECT_ID>') # Your project ID
|
|
|
|
|
.set_key('<YOUR_API_KEY>') # Your secret API key
|
2024-07-03 15:25:40 +00:00
|
|
|
|
|
|
|
|
databases = Databases.new(client)
|
|
|
|
|
|
|
|
|
|
result = databases.update_enum_attribute(
|
|
|
|
|
database_id: '<DATABASE_ID>',
|
|
|
|
|
collection_id: '<COLLECTION_ID>',
|
|
|
|
|
key: '',
|
|
|
|
|
elements: [],
|
|
|
|
|
required: false,
|
2024-09-09 08:38:15 +00:00
|
|
|
default: '<DEFAULT>',
|
|
|
|
|
new_key: '' # optional
|
2024-07-03 15:25:40 +00:00
|
|
|
)
|