Fix exceution ID

Fix return

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to appwrite here: https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md

Happy contributing!

-->

## What does this PR do?

Fixes the namespace of a bad function

## Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)

## Related PRs and Issues

- (Related PR or issue)

## Checklist

- [ ] Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)?
- [ ] If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?
This commit is contained in:
Eldad Fux
2024-02-24 18:56:58 +01:00
parent 0ad44ceb94
commit 3fb8139fd1
18310 changed files with 1 additions and 451651 deletions
+1 -1
View File
@@ -20,7 +20,6 @@ use Appwrite\Auth\Auth;
use Appwrite\Event\Certificate;
use Appwrite\Event\Event;
use Appwrite\Event\Usage;
use Appwrite\ID;
use Appwrite\Network\Validator\Origin;
use Appwrite\Utopia\Response\Filters\V11 as ResponseV11;
use Appwrite\Utopia\Response\Filters\V12 as ResponseV12;
@@ -33,6 +32,7 @@ use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Query;
use Utopia\Database\Helpers\ID;
use Utopia\Database\Validator\Authorization;
use Utopia\Validator\Hostname;
use Appwrite\Utopia\Request\Filters\V12 as RequestV12;
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Account
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
val account = Account(client)
val response = account.updatePrefs(
prefs = mapOf( "a" to "b" )
)
val json = response.body?.string()
}
@@ -1,18 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Account
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
val account = Account(client)
val response = account.updateRecovery(
userId = "[USER_ID]",
secret = "[SECRET]",
password = "password",
passwordAgain = "password"
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Account
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
val account = Account(client)
val response = account.updateSession(
sessionId = "[SESSION_ID]"
)
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Account
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
val account = Account(client)
val response = account.updateStatus()
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Account
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
val account = Account(client)
val response = account.updateVerification(
userId = "[USER_ID]",
secret = "[SECRET]"
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Avatars
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val avatars = Avatars(client)
val result = avatars.getBrowser(
code = "aa",
)
println(result); // Resource URL
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Avatars
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val avatars = Avatars(client)
val result = avatars.getCreditCard(
code = "amex",
)
println(result); // Resource URL
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Avatars
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val avatars = Avatars(client)
val result = avatars.getFavicon(
url = "https://example.com"
)
println(result); // Resource URL
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Avatars
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val avatars = Avatars(client)
val result = avatars.getFlag(
code = "af",
)
println(result); // Resource URL
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Avatars
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val avatars = Avatars(client)
val result = avatars.getImage(
url = "https://example.com",
)
println(result); // Resource URL
}
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Avatars
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val avatars = Avatars(client)
val result = avatars.getInitials(
)
println(result); // Resource URL
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Avatars
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val avatars = Avatars(client)
val result = avatars.getQR(
text = "[TEXT]",
)
println(result); // Resource URL
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createBooleanAttribute(
collectionId = "[COLLECTION_ID]",
key = "",
required = false,
)
val json = response.body?.string()
}
@@ -1,19 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createCollection(
collectionId = "[COLLECTION_ID]",
name = "[NAME]",
permission = "document",
read = listOf("role:all"),
write = listOf("role:all")
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createDocument(
collectionId = "[COLLECTION_ID]",
documentId = "[DOCUMENT_ID]",
data = mapOf( "a" to "b" ),
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createEmailAttribute(
collectionId = "[COLLECTION_ID]",
key = "",
required = false,
)
val json = response.body?.string()
}
@@ -1,18 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createEnumAttribute(
collectionId = "[COLLECTION_ID]",
key = "",
elements = listOf(),
required = false,
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createFloatAttribute(
collectionId = "[COLLECTION_ID]",
key = "",
required = false,
)
val json = response.body?.string()
}
@@ -1,18 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createIndex(
collectionId = "[COLLECTION_ID]",
key = "",
type = "key",
attributes = listOf(),
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createIntegerAttribute(
collectionId = "[COLLECTION_ID]",
key = "",
required = false,
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createIpAttribute(
collectionId = "[COLLECTION_ID]",
key = "",
required = false,
)
val json = response.body?.string()
}
@@ -1,18 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createStringAttribute(
collectionId = "[COLLECTION_ID]",
key = "",
size = 1,
required = false,
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.createUrlAttribute(
collectionId = "[COLLECTION_ID]",
key = "",
required = false,
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.create(
name = "[NAME]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.deleteAttribute(
collectionId = "[COLLECTION_ID]",
key = ""
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.deleteCollection(
collectionId = "[COLLECTION_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.deleteDocument(
collectionId = "[COLLECTION_ID]",
documentId = "[DOCUMENT_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.deleteIndex(
collectionId = "[COLLECTION_ID]",
key = ""
)
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.delete()
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.getAttribute(
collectionId = "[COLLECTION_ID]",
key = ""
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.getCollection(
collectionId = "[COLLECTION_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.getDocument(
collectionId = "[COLLECTION_ID]",
documentId = "[DOCUMENT_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.getIndex(
collectionId = "[COLLECTION_ID]",
key = ""
)
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.get()
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.listAttributes(
collectionId = "[COLLECTION_ID]"
)
val json = response.body?.string()
}
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.listCollections(
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.listDocuments(
collectionId = "[COLLECTION_ID]",
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.listIndexes(
collectionId = "[COLLECTION_ID]"
)
val json = response.body?.string()
}
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.list(
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.updateCollection(
collectionId = "[COLLECTION_ID]",
name = "[NAME]",
permission = "document",
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.updateDocument(
collectionId = "[COLLECTION_ID]",
documentId = "[DOCUMENT_ID]",
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Databases
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val databases = Databases(client, "[DATABASE_ID]")
val response = databases.update(
name = "[NAME]"
)
val json = response.body?.string()
}
@@ -1,19 +0,0 @@
import io.appwrite.Client
import io.appwrite.models.InputFile
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.createDeployment(
functionId = "[FUNCTION_ID]",
entrypoint = "[ENTRYPOINT]",
code = InputFile.fromPath("file.png"),
activate = false
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.createExecution(
functionId = "[FUNCTION_ID]",
)
val json = response.body?.string()
}
@@ -1,18 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.create(
functionId = "[FUNCTION_ID]",
name = "[NAME]",
execute = listOf("role:all"),
runtime = "node-14.5",
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.deleteDeployment(
functionId = "[FUNCTION_ID]",
deploymentId = "[DEPLOYMENT_ID]"
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.delete(
functionId = "[FUNCTION_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.getDeployment(
functionId = "[FUNCTION_ID]",
deploymentId = "[DEPLOYMENT_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.getExecution(
functionId = "[FUNCTION_ID]",
executionId = "[EXECUTION_ID]"
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.get(
functionId = "[FUNCTION_ID]"
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.listDeployments(
functionId = "[FUNCTION_ID]",
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.listExecutions(
functionId = "[FUNCTION_ID]",
)
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.listRuntimes()
val json = response.body?.string()
}
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.list(
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.retryBuild(
functionId = "[FUNCTION_ID]",
deploymentId = "[DEPLOYMENT_ID]",
buildId = "[BUILD_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.updateDeployment(
functionId = "[FUNCTION_ID]",
deploymentId = "[DEPLOYMENT_ID]"
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Functions
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val functions = Functions(client)
val response = functions.update(
functionId = "[FUNCTION_ID]",
name = "[NAME]",
execute = listOf("role:all"),
)
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.getAntivirus()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.getCache()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.getDB()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.getQueueCertificates()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.getQueueFunctions()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.getQueueLogs()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.getQueueWebhooks()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.getStorageLocal()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.getTime()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Health
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val health = Health(client)
val response = health.get()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Locale
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val locale = Locale(client)
val response = locale.getContinents()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Locale
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val locale = Locale(client)
val response = locale.getCountriesEU()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Locale
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val locale = Locale(client)
val response = locale.getCountriesPhones()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Locale
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val locale = Locale(client)
val response = locale.getCountries()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Locale
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val locale = Locale(client)
val response = locale.getCurrencies()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Locale
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val locale = Locale(client)
val response = locale.getLanguages()
val json = response.body?.string()
}
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Locale
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val locale = Locale(client)
val response = locale.get()
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.createBucket(
bucketId = "[BUCKET_ID]",
name = "[NAME]",
permission = "file",
)
val json = response.body?.string()
}
@@ -1,18 +0,0 @@
import io.appwrite.Client
import io.appwrite.models.InputFile
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.createFile(
bucketId = "[BUCKET_ID]",
fileId = "[FILE_ID]",
file = InputFile.fromPath("file.png"),
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.deleteBucket(
bucketId = "[BUCKET_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.deleteFile(
bucketId = "[BUCKET_ID]",
fileId = "[FILE_ID]"
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.getBucket(
bucketId = "[BUCKET_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val result = storage.getFileDownload(
bucketId = "[BUCKET_ID]",
fileId = "[FILE_ID]"
)
println(result); // Resource URL
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val result = storage.getFilePreview(
bucketId = "[BUCKET_ID]",
fileId = "[FILE_ID]",
)
println(result); // Resource URL
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val result = storage.getFileView(
bucketId = "[BUCKET_ID]",
fileId = "[FILE_ID]"
)
println(result); // Resource URL
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.getFile(
bucketId = "[BUCKET_ID]",
fileId = "[FILE_ID]"
)
val json = response.body?.string()
}
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.listBuckets(
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.listFiles(
bucketId = "[BUCKET_ID]",
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.updateBucket(
bucketId = "[BUCKET_ID]",
name = "[NAME]",
permission = "file",
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Storage
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val storage = Storage(client)
val response = storage.updateFile(
bucketId = "[BUCKET_ID]",
fileId = "[FILE_ID]",
)
val json = response.body?.string()
}
@@ -1,18 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.createMembership(
teamId = "[TEAM_ID]",
email = "email@example.com",
roles = listOf(),
url = "https://example.com",
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.create(
teamId = "[TEAM_ID]",
name = "[NAME]",
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.deleteMembership(
teamId = "[TEAM_ID]",
membershipId = "[MEMBERSHIP_ID]"
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.delete(
teamId = "[TEAM_ID]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.getMembership(
teamId = "[TEAM_ID]",
membershipId = "[MEMBERSHIP_ID]"
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.getMemberships(
teamId = "[TEAM_ID]",
)
val json = response.body?.string()
}
@@ -1,15 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.get(
teamId = "[TEAM_ID]"
)
val json = response.body?.string()
}
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.list(
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.updateMembershipRoles(
teamId = "[TEAM_ID]",
membershipId = "[MEMBERSHIP_ID]",
roles = listOf()
)
val json = response.body?.string()
}
@@ -1,18 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
val teams = Teams(client)
val response = teams.updateMembershipStatus(
teamId = "[TEAM_ID]",
membershipId = "[MEMBERSHIP_ID]",
userId = "[USER_ID]",
secret = "[SECRET]"
)
val json = response.body?.string()
}
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Teams
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val teams = Teams(client)
val response = teams.update(
teamId = "[TEAM_ID]",
name = "[NAME]"
)
val json = response.body?.string()
}
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.services.Users
suspend fun main() {
val client = Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
val users = Users(client)
val response = users.create(
userId = "[USER_ID]",
email = "email@example.com",
password = "password",
)
val json = response.body?.string()
}

Some files were not shown because too many files have changed in this diff Show More