mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: update specs and examples
This commit is contained in:
@@ -13,5 +13,5 @@ result = avatars.get_browser(
|
||||
code = Browser.AVANT_BROWSER,
|
||||
width = 0, # optional
|
||||
height = 0, # optional
|
||||
quality = 0 # optional
|
||||
quality = -1 # optional
|
||||
)
|
||||
|
||||
@@ -13,5 +13,5 @@ result = avatars.get_credit_card(
|
||||
code = CreditCard.AMERICAN_EXPRESS,
|
||||
width = 0, # optional
|
||||
height = 0, # optional
|
||||
quality = 0 # optional
|
||||
quality = -1 # optional
|
||||
)
|
||||
|
||||
@@ -13,5 +13,5 @@ result = avatars.get_flag(
|
||||
code = Flag.AFGHANISTAN,
|
||||
width = 0, # optional
|
||||
height = 0, # optional
|
||||
quality = 0 # optional
|
||||
quality = -1 # optional
|
||||
)
|
||||
|
||||
@@ -15,5 +15,6 @@ result = databases.create_index(
|
||||
key = '',
|
||||
type = IndexType.KEY,
|
||||
attributes = [],
|
||||
orders = [] # optional
|
||||
orders = [], # optional
|
||||
lengths = [] # optional
|
||||
)
|
||||
|
||||
@@ -10,5 +10,6 @@ storage = Storage(client)
|
||||
|
||||
result = storage.get_file_download(
|
||||
bucket_id = '<BUCKET_ID>',
|
||||
file_id = '<FILE_ID>'
|
||||
file_id = '<FILE_ID>',
|
||||
token = '<TOKEN>' # optional
|
||||
)
|
||||
|
||||
@@ -14,12 +14,13 @@ result = storage.get_file_preview(
|
||||
width = 0, # optional
|
||||
height = 0, # optional
|
||||
gravity = ImageGravity.CENTER, # optional
|
||||
quality = 0, # optional
|
||||
quality = -1, # optional
|
||||
border_width = 0, # optional
|
||||
border_color = '', # optional
|
||||
border_radius = 0, # optional
|
||||
opacity = 0, # optional
|
||||
rotation = -360, # optional
|
||||
background = '', # optional
|
||||
output = ImageFormat.JPG # optional
|
||||
output = ImageFormat.JPG, # optional
|
||||
token = '<TOKEN>' # optional
|
||||
)
|
||||
|
||||
@@ -10,5 +10,6 @@ storage = Storage(client)
|
||||
|
||||
result = storage.get_file_view(
|
||||
bucket_id = '<BUCKET_ID>',
|
||||
file_id = '<FILE_ID>'
|
||||
file_id = '<FILE_ID>',
|
||||
token = '<TOKEN>' # optional
|
||||
)
|
||||
|
||||
@@ -4,13 +4,12 @@ from appwrite.services.tokens import Tokens
|
||||
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
|
||||
client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
|
||||
tokens = Tokens(client)
|
||||
|
||||
result = tokens.create_file_token(
|
||||
bucket_id = '<BUCKET_ID>',
|
||||
file_id = '<FILE_ID>',
|
||||
expire = '', # optional
|
||||
permissions = ["read("any")"] # optional
|
||||
expire = '' # optional
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ from appwrite.services.tokens import Tokens
|
||||
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
|
||||
client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
|
||||
tokens = Tokens(client)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from appwrite.services.tokens import Tokens
|
||||
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
|
||||
client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
|
||||
tokens = Tokens(client)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from appwrite.services.tokens import Tokens
|
||||
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
|
||||
client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
|
||||
tokens = Tokens(client)
|
||||
|
||||
|
||||
@@ -4,12 +4,11 @@ from appwrite.services.tokens import Tokens
|
||||
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
|
||||
client.set_key('<YOUR_API_KEY>') # Your secret API key
|
||||
|
||||
tokens = Tokens(client)
|
||||
|
||||
result = tokens.update(
|
||||
token_id = '<TOKEN_ID>',
|
||||
expire = '', # optional
|
||||
permissions = ["read("any")"] # optional
|
||||
expire = '' # optional
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user