Skip to content

Commit aa98fbb

Browse files
authored
Merge pull request #10855 from appwrite/update-sdk-examples-docs
Update SDK generator and regenerate Java/Kotlin documentation examples
2 parents 3d8cee4 + 8f1b3a8 commit aa98fbb

189 files changed

Lines changed: 375 additions & 391 deletions

File tree

Some content is hidden

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

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/examples/1.8.x/client-android/java/account/create-o-auth-2-session.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ account.createOAuth2Session(
1313
OAuthProvider.AMAZON, // provider
1414
"https://example.com", // success (optional)
1515
"https://example.com", // failure (optional)
16-
listOf(), // scopes (optional)
16+
List.of(), // scopes (optional)
1717
new CoroutineCallback<>((result, error) -> {
1818
if (error != null) {
1919
error.printStackTrace();

docs/examples/1.8.x/client-android/java/account/create-o-auth-2-token.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ account.createOAuth2Token(
1313
OAuthProvider.AMAZON, // provider
1414
"https://example.com", // success (optional)
1515
"https://example.com", // failure (optional)
16-
listOf(), // scopes (optional)
16+
List.of(), // scopes (optional)
1717
new CoroutineCallback<>((result, error) -> {
1818
if (error != null) {
1919
error.printStackTrace();

docs/examples/1.8.x/client-android/java/account/list-identities.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99
Account account = new Account(client);
1010

1111
account.listIdentities(
12-
listOf(), // queries (optional)
12+
List.of(), // queries (optional)
1313
false, // total (optional)
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {

docs/examples/1.8.x/client-android/java/account/list-logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99
Account account = new Account(client);
1010

1111
account.listLogs(
12-
listOf(), // queries (optional)
12+
List.of(), // queries (optional)
1313
false, // total (optional)
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {

docs/examples/1.8.x/client-android/java/account/update-prefs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Client client = new Client(context)
99
Account account = new Account(client);
1010

1111
account.updatePrefs(
12-
mapOf(
13-
"language" to "en",
14-
"timezone" to "UTC",
15-
"darkTheme" to true
12+
Map.of(
13+
"language", "en",
14+
"timezone", "UTC",
15+
"darkTheme", true
1616
), // prefs
1717
new CoroutineCallback<>((result, error) -> {
1818
if (error != null) {

docs/examples/1.8.x/client-android/java/avatars/get-screenshot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Avatars avatars = new Avatars(client);
1313

1414
avatars.getScreenshot(
1515
"https://example.com", // url
16-
mapOf( "a" to "b" ), // headers (optional)
16+
Map.of("a", "b"), // headers (optional)
1717
1, // viewportWidth (optional)
1818
1, // viewportHeight (optional)
1919
0.1, // scale (optional)
@@ -26,7 +26,7 @@ avatars.getScreenshot(
2626
-180, // longitude (optional)
2727
0, // accuracy (optional)
2828
false, // touch (optional)
29-
listOf(), // permissions (optional)
29+
List.of(), // permissions (optional)
3030
0, // sleep (optional)
3131
0, // width (optional)
3232
0, // height (optional)

docs/examples/1.8.x/client-android/java/databases/create-document.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
3-
import io.appwrite.services.Databases;
43
import io.appwrite.Permission;
54
import io.appwrite.Role;
5+
import io.appwrite.services.Databases;
66

77
Client client = new Client(context)
88
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
@@ -14,14 +14,14 @@ databases.createDocument(
1414
"<DATABASE_ID>", // databaseId
1515
"<COLLECTION_ID>", // collectionId
1616
"<DOCUMENT_ID>", // documentId
17-
mapOf(
18-
"username" to "walter.obrien",
19-
"email" to "[email protected]",
20-
"fullName" to "Walter O'Brien",
21-
"age" to 30,
22-
"isAdmin" to false
17+
Map.of(
18+
"username", "walter.obrien",
19+
"email", "[email protected]",
20+
"fullName", "Walter O'Brien",
21+
"age", 30,
22+
"isAdmin", false
2323
), // data
24-
listOf(Permission.read(Role.any())), // permissions (optional)
24+
List.of(Permission.read(Role.any())), // permissions (optional)
2525
"<TRANSACTION_ID>", // transactionId (optional)
2626
new CoroutineCallback<>((result, error) -> {
2727
if (error != null) {

docs/examples/1.8.x/client-android/java/databases/create-operations.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ Databases databases = new Databases(client);
1010

1111
databases.createOperations(
1212
"<TRANSACTION_ID>", // transactionId
13-
listOf(
14-
{
15-
"action": "create",
16-
"databaseId": "<DATABASE_ID>",
17-
"collectionId": "<COLLECTION_ID>",
18-
"documentId": "<DOCUMENT_ID>",
19-
"data": {
20-
"name": "Walter O'Brien"
21-
}
22-
}
23-
), // operations (optional)
13+
List.of(Map.of(
14+
"action", "create",
15+
"databaseId", "<DATABASE_ID>",
16+
"collectionId", "<COLLECTION_ID>",
17+
"documentId", "<DOCUMENT_ID>",
18+
"data", Map.of(
19+
"name", "Walter O'Brien"
20+
)
21+
)), // operations (optional)
2422
new CoroutineCallback<>((result, error) -> {
2523
if (error != null) {
2624
error.printStackTrace();

docs/examples/1.8.x/client-android/java/databases/get-document.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ databases.getDocument(
1212
"<DATABASE_ID>", // databaseId
1313
"<COLLECTION_ID>", // collectionId
1414
"<DOCUMENT_ID>", // documentId
15-
listOf(), // queries (optional)
15+
List.of(), // queries (optional)
1616
"<TRANSACTION_ID>", // transactionId (optional)
1717
new CoroutineCallback<>((result, error) -> {
1818
if (error != null) {

0 commit comments

Comments
 (0)