Skip to content

Commit e4080da

Browse files
committed
feat: initial commit
1 parent 86023ea commit e4080da

File tree

101 files changed

+3616
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+3616
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**CHANGELOG**

build.gradle

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apply plugin: 'io.github.gradle-nexus.publish-plugin'
2+
3+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
4+
buildscript {
5+
ext.kotlin_version = "1.4.31"
6+
version '0.0.0-SNAPSHOT'
7+
repositories {
8+
maven { url "https://plugins.gradle.org/m2/" }
9+
google()
10+
mavenCentral()
11+
}
12+
dependencies {
13+
classpath "com.android.tools.build:gradle:4.2.0"
14+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
15+
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
16+
17+
// NOTE: Do not place your application dependencies here; they belong
18+
// in the individual module build.gradle files
19+
}
20+
}
21+
22+
allprojects {
23+
repositories {
24+
maven { url "https://jitpack.io" }
25+
google()
26+
mavenCentral()
27+
}
28+
}
29+
30+
task clean(type: Delete) {
31+
delete rootProject.buildDir
32+
}
33+
34+
35+
apply from: "${rootDir}/scripts/publish-config.gradle"
36+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.createAnonymousSession()
10+
val json = response.body?.string()

docs/examples/account/create-j-w-t.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.createJWT()
10+
val json = response.body?.string()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.createOAuth2Session("amazon")
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.createRecovery("[email protected]", "https://example.com")
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.createSession("[email protected]", "password")
10+
val json = response.body?.string()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.createVerification("https://example.com")
10+
val json = response.body?.string()

docs/examples/account/create.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.create("[email protected]", "password")
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.deleteSession("[SESSION_ID]")
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.deleteSessions()
10+
val json = response.body?.string()

docs/examples/account/delete.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.delete()
10+
val json = response.body?.string()

docs/examples/account/get-logs.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.getLogs()
10+
val json = response.body?.string()

docs/examples/account/get-prefs.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.getPrefs()
10+
val json = response.body?.string()

docs/examples/account/get-sessions.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.getSessions()
10+
val json = response.body?.string()

docs/examples/account/get.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.get()
10+
val json = response.body?.string()

docs/examples/account/update-email.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.updateEmail("[email protected]", "password")
10+
val json = response.body?.string()

docs/examples/account/update-name.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.updateName("[NAME]")
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.updatePassword("password")
10+
val json = response.body?.string()

docs/examples/account/update-prefs.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.updatePrefs({})
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.updateRecovery("[USER_ID]", "[SECRET]", "password", "password")
10+
val json = response.body?.string()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Account
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val accountService = Account(client)
9+
val response = accountService.updateVerification("[USER_ID]", "[SECRET]")
10+
val json = response.body?.string()

docs/examples/avatars/get-browser.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Avatars
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val avatarsService = Avatars(client)
9+
val response = avatarsService.getBrowser("aa")
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Avatars
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val avatarsService = Avatars(client)
9+
val response = avatarsService.getCreditCard("amex")
10+
val json = response.body?.string()

docs/examples/avatars/get-favicon.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Avatars
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val avatarsService = Avatars(client)
9+
val response = avatarsService.getFavicon("https://example.com")
10+
val json = response.body?.string()

docs/examples/avatars/get-flag.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Avatars
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val avatarsService = Avatars(client)
9+
val response = avatarsService.getFlag("af")
10+
val json = response.body?.string()

docs/examples/avatars/get-image.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Avatars
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val avatarsService = Avatars(client)
9+
val response = avatarsService.getImage("https://example.com")
10+
val json = response.body?.string()

docs/examples/avatars/get-initials.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Avatars
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val avatarsService = Avatars(client)
9+
val response = avatarsService.getInitials()
10+
val json = response.body?.string()

docs/examples/avatars/get-q-r.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Avatars
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val avatarsService = Avatars(client)
9+
val response = avatarsService.getQR("[TEXT]")
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Database
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val databaseService = Database(client)
9+
val response = databaseService.createDocument("[COLLECTION_ID]", {})
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Database
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val databaseService = Database(client)
9+
val response = databaseService.deleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]")
10+
val json = response.body?.string()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Database
3+
4+
val client = Client(context)
5+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
8+
val databaseService = Database(client)
9+
val response = databaseService.getDocument("[COLLECTION_ID]", "[DOCUMENT_ID]")
10+
val json = response.body?.string()

0 commit comments

Comments
 (0)