mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: regen
This commit is contained in:
@@ -3,6 +3,7 @@ from appwrite.services.databases import Databases
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
client.set_admin('') #
|
||||
client.set_session('') # The user session to authenticate with
|
||||
client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token
|
||||
|
||||
@@ -3,6 +3,7 @@ from appwrite.services.databases import Databases
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
client.set_admin('') #
|
||||
client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.databases import Databases
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
|
||||
client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.decrement_document_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
document_id = '<DOCUMENT_ID>',
|
||||
attribute = '',
|
||||
value = None, # optional
|
||||
min = None # optional
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.databases import Databases
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
|
||||
client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.increment_document_attribute(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
document_id = '<DOCUMENT_ID>',
|
||||
attribute = '',
|
||||
value = None, # optional
|
||||
max = None # optional
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.databases import Databases
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
|
||||
client.set_session('') # The user session to authenticate with
|
||||
|
||||
databases = Databases(client)
|
||||
|
||||
result = databases.upsert_document(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
document_id = '<DOCUMENT_ID>',
|
||||
data = {},
|
||||
permissions = ["read("any")"] # optional
|
||||
)
|
||||
@@ -11,5 +11,5 @@ databases = Databases(client)
|
||||
result = databases.upsert_documents(
|
||||
database_id = '<DATABASE_ID>',
|
||||
collection_id = '<COLLECTION_ID>',
|
||||
documents = [] # optional
|
||||
documents = []
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user