mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #10828 from appwrite/fix-enum-examples
fix: a lot of enum examples generated
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.avatars import Avatars
|
||||
from appwrite.enums import Theme
|
||||
from appwrite.enums import Timezone
|
||||
from appwrite.enums import Output
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
@@ -14,11 +17,11 @@ result = avatars.get_screenshot(
|
||||
viewport_width = 1, # optional
|
||||
viewport_height = 1, # optional
|
||||
scale = 0.1, # optional
|
||||
theme = .LIGHT, # optional
|
||||
theme = Theme.LIGHT, # optional
|
||||
user_agent = '<USER_AGENT>', # optional
|
||||
fullpage = False, # optional
|
||||
locale = '<LOCALE>', # optional
|
||||
timezone = .AFRICA_ABIDJAN, # optional
|
||||
timezone = Timezone.AFRICA_ABIDJAN, # optional
|
||||
latitude = -90, # optional
|
||||
longitude = -180, # optional
|
||||
accuracy = 0, # optional
|
||||
@@ -28,5 +31,5 @@ result = avatars.get_screenshot(
|
||||
width = 0, # optional
|
||||
height = 0, # optional
|
||||
quality = -1, # optional
|
||||
output = .JPG # optional
|
||||
output = Output.JPG # optional
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.databases import Databases
|
||||
from appwrite.enums import RelationshipType
|
||||
from appwrite.enums import RelationMutate
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.databases import Databases
|
||||
from appwrite.enums import RelationMutate
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.functions import Functions
|
||||
from appwrite.enums import ExecutionMethod
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.functions import Functions
|
||||
from appwrite.enums import
|
||||
from appwrite.enums import Runtime
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
@@ -12,7 +12,7 @@ functions = Functions(client)
|
||||
result = functions.create(
|
||||
function_id = '<FUNCTION_ID>',
|
||||
name = '<NAME>',
|
||||
runtime = .NODE_14_5,
|
||||
runtime = Runtime.NODE_14_5,
|
||||
execute = ["any"], # optional
|
||||
events = [], # optional
|
||||
schedule = '', # optional
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.functions import Functions
|
||||
from appwrite.enums import DeploymentDownloadType
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.functions import Functions
|
||||
from appwrite.enums import Runtime
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
@@ -11,7 +12,7 @@ functions = Functions(client)
|
||||
result = functions.update(
|
||||
function_id = '<FUNCTION_ID>',
|
||||
name = '<NAME>',
|
||||
runtime = .NODE_14_5, # optional
|
||||
runtime = Runtime.NODE_14_5, # optional
|
||||
execute = ["any"], # optional
|
||||
events = [], # optional
|
||||
schedule = '', # optional
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.health import Health
|
||||
from appwrite.enums import
|
||||
from appwrite.enums import Name
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
@@ -10,6 +10,6 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
health = Health(client)
|
||||
|
||||
result = health.get_failed_jobs(
|
||||
name = .V1_DATABASE,
|
||||
name = Name.V1_DATABASE,
|
||||
threshold = None # optional
|
||||
)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.messaging import Messaging
|
||||
from appwrite.enums import MessagePriority
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.messaging import Messaging
|
||||
from appwrite.enums import SmtpEncryption
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.messaging import Messaging
|
||||
from appwrite.enums import MessagePriority
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.messaging import Messaging
|
||||
from appwrite.enums import SmtpEncryption
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.sites import Sites
|
||||
from appwrite.enums import
|
||||
from appwrite.enums import
|
||||
from appwrite.enums import Framework
|
||||
from appwrite.enums import BuildRuntime
|
||||
from appwrite.enums import Adapter
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
@@ -13,15 +14,15 @@ sites = Sites(client)
|
||||
result = sites.create(
|
||||
site_id = '<SITE_ID>',
|
||||
name = '<NAME>',
|
||||
framework = .ANALOG,
|
||||
build_runtime = .NODE_14_5,
|
||||
framework = Framework.ANALOG,
|
||||
build_runtime = BuildRuntime.NODE_14_5,
|
||||
enabled = False, # optional
|
||||
logging = False, # optional
|
||||
timeout = 1, # optional
|
||||
install_command = '<INSTALL_COMMAND>', # optional
|
||||
build_command = '<BUILD_COMMAND>', # optional
|
||||
output_directory = '<OUTPUT_DIRECTORY>', # optional
|
||||
adapter = .STATIC, # optional
|
||||
adapter = Adapter.STATIC, # optional
|
||||
installation_id = '<INSTALLATION_ID>', # optional
|
||||
fallback_file = '<FALLBACK_FILE>', # optional
|
||||
provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.sites import Sites
|
||||
from appwrite.enums import DeploymentDownloadType
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.sites import Sites
|
||||
from appwrite.enums import
|
||||
from appwrite.enums import Framework
|
||||
from appwrite.enums import BuildRuntime
|
||||
from appwrite.enums import Adapter
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
@@ -12,15 +14,15 @@ sites = Sites(client)
|
||||
result = sites.update(
|
||||
site_id = '<SITE_ID>',
|
||||
name = '<NAME>',
|
||||
framework = .ANALOG,
|
||||
framework = Framework.ANALOG,
|
||||
enabled = False, # optional
|
||||
logging = False, # optional
|
||||
timeout = 1, # optional
|
||||
install_command = '<INSTALL_COMMAND>', # optional
|
||||
build_command = '<BUILD_COMMAND>', # optional
|
||||
output_directory = '<OUTPUT_DIRECTORY>', # optional
|
||||
build_runtime = .NODE_14_5, # optional
|
||||
adapter = .STATIC, # optional
|
||||
build_runtime = BuildRuntime.NODE_14_5, # optional
|
||||
adapter = Adapter.STATIC, # optional
|
||||
fallback_file = '<FALLBACK_FILE>', # optional
|
||||
installation_id = '<INSTALLATION_ID>', # optional
|
||||
provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.storage import Storage
|
||||
from appwrite.enums import Compression
|
||||
from appwrite.permission import Permission
|
||||
from appwrite.role import Role
|
||||
|
||||
@@ -18,7 +19,7 @@ result = storage.create_bucket(
|
||||
enabled = False, # optional
|
||||
maximum_file_size = 1, # optional
|
||||
allowed_file_extensions = [], # optional
|
||||
compression = .NONE, # optional
|
||||
compression = Compression.NONE, # optional
|
||||
encryption = False, # optional
|
||||
antivirus = False, # optional
|
||||
transformations = False # optional
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.storage import Storage
|
||||
from appwrite.enums import ImageGravity
|
||||
from appwrite.enums import ImageFormat
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.storage import Storage
|
||||
from appwrite.enums import Compression
|
||||
from appwrite.permission import Permission
|
||||
from appwrite.role import Role
|
||||
|
||||
@@ -18,7 +19,7 @@ result = storage.update_bucket(
|
||||
enabled = False, # optional
|
||||
maximum_file_size = 1, # optional
|
||||
allowed_file_extensions = [], # optional
|
||||
compression = .NONE, # optional
|
||||
compression = Compression.NONE, # optional
|
||||
encryption = False, # optional
|
||||
antivirus = False, # optional
|
||||
transformations = False # optional
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.tables_db import TablesDB
|
||||
from appwrite.enums import RelationshipType
|
||||
from appwrite.enums import RelationMutate
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.tables_db import TablesDB
|
||||
from appwrite.enums import RelationMutate
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.users import Users
|
||||
from appwrite.enums import PasswordHash
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
|
||||
Reference in New Issue
Block a user