From 822a52522d94a53a8cd839c90ab10928ea3c396a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 6 Jul 2021 23:07:40 +0530 Subject: [PATCH] feat(sdks): generate java docs --- .../java/account/create-anonymous-session.md | 46 +++++++++++++++++ .../java/account/create-j-w-t.md | 46 +++++++++++++++++ .../java/account/create-o-auth2session.md | 46 +++++++++++++++++ .../java/account/create-recovery.md | 49 ++++++++++++++++++ .../java/account/create-session.md | 49 ++++++++++++++++++ .../java/account/create-verification.md | 48 +++++++++++++++++ .../client-android/java/account/create.md | 49 ++++++++++++++++++ .../java/account/delete-session.md | 48 +++++++++++++++++ .../java/account/delete-sessions.md | 46 +++++++++++++++++ .../client-android/java/account/delete.md | 46 +++++++++++++++++ .../client-android/java/account/get-logs.md | 46 +++++++++++++++++ .../client-android/java/account/get-prefs.md | 46 +++++++++++++++++ .../java/account/get-session.md | 48 +++++++++++++++++ .../java/account/get-sessions.md | 46 +++++++++++++++++ .../0.9.x/client-android/java/account/get.md | 46 +++++++++++++++++ .../java/account/update-email.md | 49 ++++++++++++++++++ .../java/account/update-name.md | 48 +++++++++++++++++ .../java/account/update-password.md | 48 +++++++++++++++++ .../java/account/update-prefs.md | 48 +++++++++++++++++ .../java/account/update-recovery.md | 51 +++++++++++++++++++ .../java/account/update-verification.md | 49 ++++++++++++++++++ .../java/avatars/get-browser.md | 48 +++++++++++++++++ .../java/avatars/get-credit-card.md | 48 +++++++++++++++++ .../java/avatars/get-favicon.md | 48 +++++++++++++++++ .../client-android/java/avatars/get-flag.md | 48 +++++++++++++++++ .../client-android/java/avatars/get-image.md | 48 +++++++++++++++++ .../java/avatars/get-initials.md | 47 +++++++++++++++++ .../client-android/java/avatars/get-q-r.md | 48 +++++++++++++++++ .../java/database/create-document.md | 49 ++++++++++++++++++ .../java/database/delete-document.md | 49 ++++++++++++++++++ .../java/database/get-document.md | 49 ++++++++++++++++++ .../java/database/list-documents.md | 48 +++++++++++++++++ .../java/database/update-document.md | 50 ++++++++++++++++++ .../java/functions/create-execution.md | 48 +++++++++++++++++ .../java/functions/get-execution.md | 49 ++++++++++++++++++ .../java/functions/list-executions.md | 48 +++++++++++++++++ .../java/locale/get-continents.md | 46 +++++++++++++++++ .../java/locale/get-countries-e-u.md | 46 +++++++++++++++++ .../java/locale/get-countries-phones.md | 46 +++++++++++++++++ .../java/locale/get-countries.md | 46 +++++++++++++++++ .../java/locale/get-currencies.md | 46 +++++++++++++++++ .../java/locale/get-languages.md | 46 +++++++++++++++++ .../0.9.x/client-android/java/locale/get.md | 46 +++++++++++++++++ .../java/storage/create-file.md | 48 +++++++++++++++++ .../java/storage/delete-file.md | 48 +++++++++++++++++ .../java/storage/get-file-download.md | 48 +++++++++++++++++ .../java/storage/get-file-preview.md | 48 +++++++++++++++++ .../java/storage/get-file-view.md | 48 +++++++++++++++++ .../client-android/java/storage/get-file.md | 48 +++++++++++++++++ .../client-android/java/storage/list-files.md | 47 +++++++++++++++++ .../java/storage/update-file.md | 50 ++++++++++++++++++ .../java/teams/create-membership.md | 51 +++++++++++++++++++ .../0.9.x/client-android/java/teams/create.md | 48 +++++++++++++++++ .../java/teams/delete-membership.md | 49 ++++++++++++++++++ .../0.9.x/client-android/java/teams/delete.md | 48 +++++++++++++++++ .../java/teams/get-memberships.md | 48 +++++++++++++++++ .../0.9.x/client-android/java/teams/get.md | 48 +++++++++++++++++ .../0.9.x/client-android/java/teams/list.md | 47 +++++++++++++++++ .../java/teams/update-membership-roles.md | 50 ++++++++++++++++++ .../java/teams/update-membership-status.md | 51 +++++++++++++++++++ .../0.9.x/client-android/java/teams/update.md | 49 ++++++++++++++++++ .../account/create-anonymous-session.md | 2 +- .../account/create-j-w-t.md | 2 +- .../account/create-o-auth2session.md | 5 +- .../account/create-recovery.md | 2 +- .../account/create-session.md | 2 +- .../account/create-verification.md | 2 +- .../{examples => kotlin}/account/create.md | 2 +- .../account/delete-session.md | 2 +- .../account/delete-sessions.md | 2 +- .../{examples => kotlin}/account/delete.md | 2 +- .../{examples => kotlin}/account/get-logs.md | 2 +- .../{examples => kotlin}/account/get-prefs.md | 2 +- .../account/get-session.md | 2 +- .../account/get-sessions.md | 2 +- .../{examples => kotlin}/account/get.md | 2 +- .../account/update-email.md | 2 +- .../account/update-name.md | 2 +- .../account/update-password.md | 2 +- .../account/update-prefs.md | 2 +- .../account/update-recovery.md | 2 +- .../account/update-verification.md | 2 +- .../avatars/get-browser.md | 4 +- .../avatars/get-credit-card.md | 4 +- .../avatars/get-favicon.md | 4 +- .../{examples => kotlin}/avatars/get-flag.md | 4 +- .../{examples => kotlin}/avatars/get-image.md | 4 +- .../avatars/get-initials.md | 4 +- .../{examples => kotlin}/avatars/get-q-r.md | 4 +- .../database/create-document.md | 2 +- .../database/delete-document.md | 2 +- .../database/get-document.md | 2 +- .../database/list-documents.md | 2 +- .../database/update-document.md | 2 +- .../functions/create-execution.md | 2 +- .../functions/get-execution.md | 2 +- .../functions/list-executions.md | 2 +- .../locale/get-continents.md | 2 +- .../locale/get-countries-e-u.md | 2 +- .../locale/get-countries-phones.md | 2 +- .../locale/get-countries.md | 2 +- .../locale/get-currencies.md | 2 +- .../locale/get-languages.md | 2 +- .../{examples => kotlin}/locale/get.md | 2 +- .../storage/create-file.md | 2 +- .../storage/delete-file.md | 2 +- .../storage/get-file-download.md | 4 +- .../storage/get-file-preview.md | 4 +- .../storage/get-file-view.md | 4 +- .../{examples => kotlin}/storage/get-file.md | 2 +- .../storage/list-files.md | 2 +- .../storage/update-file.md | 2 +- .../teams/create-membership.md | 2 +- .../{examples => kotlin}/teams/create.md | 2 +- .../teams/delete-membership.md | 2 +- .../{examples => kotlin}/teams/delete.md | 2 +- .../teams/get-memberships.md | 2 +- .../{examples => kotlin}/teams/get.md | 2 +- .../{examples => kotlin}/teams/list.md | 2 +- .../teams/update-membership-roles.md | 2 +- .../teams/update-membership-status.md | 2 +- .../{examples => kotlin}/teams/update.md | 2 +- .../java/account/create-recovery.md | 37 ++++++++++++++ .../java/account/create-verification.md | 36 +++++++++++++ .../java/account/delete-session.md | 36 +++++++++++++ .../java/account/delete-sessions.md | 33 ++++++++++++ .../server-kotlin/java/account/delete.md | 33 ++++++++++++ .../server-kotlin/java/account/get-logs.md | 33 ++++++++++++ .../server-kotlin/java/account/get-prefs.md | 33 ++++++++++++ .../server-kotlin/java/account/get-session.md | 36 +++++++++++++ .../java/account/get-sessions.md | 33 ++++++++++++ .../0.9.x/server-kotlin/java/account/get.md | 33 ++++++++++++ .../java/account/update-email.md | 37 ++++++++++++++ .../server-kotlin/java/account/update-name.md | 36 +++++++++++++ .../java/account/update-password.md | 36 +++++++++++++ .../java/account/update-prefs.md | 36 +++++++++++++ .../java/account/update-recovery.md | 39 ++++++++++++++ .../java/account/update-verification.md | 37 ++++++++++++++ .../server-kotlin/java/avatars/get-browser.md | 36 +++++++++++++ .../java/avatars/get-credit-card.md | 36 +++++++++++++ .../server-kotlin/java/avatars/get-favicon.md | 36 +++++++++++++ .../server-kotlin/java/avatars/get-flag.md | 36 +++++++++++++ .../server-kotlin/java/avatars/get-image.md | 36 +++++++++++++ .../java/avatars/get-initials.md | 35 +++++++++++++ .../server-kotlin/java/avatars/get-q-r.md | 36 +++++++++++++ .../java/database/create-collection.md | 39 ++++++++++++++ .../java/database/create-document.md | 37 ++++++++++++++ .../java/database/delete-collection.md | 36 +++++++++++++ .../java/database/delete-document.md | 37 ++++++++++++++ .../java/database/get-collection.md | 36 +++++++++++++ .../java/database/get-document.md | 37 ++++++++++++++ .../java/database/list-collections.md | 35 +++++++++++++ .../java/database/list-documents.md | 36 +++++++++++++ .../java/database/update-collection.md | 37 ++++++++++++++ .../java/database/update-document.md | 38 ++++++++++++++ .../java/functions/create-execution.md | 36 +++++++++++++ .../java/functions/create-tag.md | 38 ++++++++++++++ .../server-kotlin/java/functions/create.md | 38 ++++++++++++++ .../java/functions/delete-tag.md | 37 ++++++++++++++ .../server-kotlin/java/functions/delete.md | 36 +++++++++++++ .../java/functions/get-execution.md | 37 ++++++++++++++ .../server-kotlin/java/functions/get-tag.md | 37 ++++++++++++++ .../0.9.x/server-kotlin/java/functions/get.md | 36 +++++++++++++ .../java/functions/list-executions.md | 36 +++++++++++++ .../server-kotlin/java/functions/list-tags.md | 36 +++++++++++++ .../server-kotlin/java/functions/list.md | 35 +++++++++++++ .../java/functions/update-tag.md | 37 ++++++++++++++ .../server-kotlin/java/functions/update.md | 38 ++++++++++++++ .../java/health/get-anti-virus.md | 33 ++++++++++++ .../server-kotlin/java/health/get-cache.md | 33 ++++++++++++ .../server-kotlin/java/health/get-d-b.md | 33 ++++++++++++ .../java/health/get-queue-certificates.md | 33 ++++++++++++ .../java/health/get-queue-functions.md | 33 ++++++++++++ .../java/health/get-queue-logs.md | 33 ++++++++++++ .../java/health/get-queue-tasks.md | 33 ++++++++++++ .../java/health/get-queue-usage.md | 33 ++++++++++++ .../java/health/get-queue-webhooks.md | 33 ++++++++++++ .../java/health/get-storage-local.md | 33 ++++++++++++ .../server-kotlin/java/health/get-time.md | 33 ++++++++++++ .../0.9.x/server-kotlin/java/health/get.md | 33 ++++++++++++ .../java/locale/get-continents.md | 33 ++++++++++++ .../java/locale/get-countries-e-u.md | 33 ++++++++++++ .../java/locale/get-countries-phones.md | 33 ++++++++++++ .../java/locale/get-countries.md | 33 ++++++++++++ .../java/locale/get-currencies.md | 33 ++++++++++++ .../java/locale/get-languages.md | 33 ++++++++++++ .../0.9.x/server-kotlin/java/locale/get.md | 33 ++++++++++++ .../server-kotlin/java/storage/create-file.md | 36 +++++++++++++ .../server-kotlin/java/storage/delete-file.md | 36 +++++++++++++ .../java/storage/get-file-download.md | 36 +++++++++++++ .../java/storage/get-file-preview.md | 36 +++++++++++++ .../java/storage/get-file-view.md | 36 +++++++++++++ .../server-kotlin/java/storage/get-file.md | 36 +++++++++++++ .../server-kotlin/java/storage/list-files.md | 35 +++++++++++++ .../server-kotlin/java/storage/update-file.md | 38 ++++++++++++++ .../java/teams/create-membership.md | 39 ++++++++++++++ .../0.9.x/server-kotlin/java/teams/create.md | 36 +++++++++++++ .../java/teams/delete-membership.md | 37 ++++++++++++++ .../0.9.x/server-kotlin/java/teams/delete.md | 36 +++++++++++++ .../java/teams/get-memberships.md | 36 +++++++++++++ .../0.9.x/server-kotlin/java/teams/get.md | 36 +++++++++++++ .../0.9.x/server-kotlin/java/teams/list.md | 35 +++++++++++++ .../java/teams/update-membership-roles.md | 38 ++++++++++++++ .../java/teams/update-membership-status.md | 39 ++++++++++++++ .../0.9.x/server-kotlin/java/teams/update.md | 37 ++++++++++++++ .../0.9.x/server-kotlin/java/users/create.md | 37 ++++++++++++++ .../java/users/delete-session.md | 37 ++++++++++++++ .../java/users/delete-sessions.md | 36 +++++++++++++ .../0.9.x/server-kotlin/java/users/delete.md | 36 +++++++++++++ .../server-kotlin/java/users/get-logs.md | 36 +++++++++++++ .../server-kotlin/java/users/get-prefs.md | 36 +++++++++++++ .../server-kotlin/java/users/get-sessions.md | 36 +++++++++++++ .../0.9.x/server-kotlin/java/users/get.md | 36 +++++++++++++ .../0.9.x/server-kotlin/java/users/list.md | 35 +++++++++++++ .../server-kotlin/java/users/update-prefs.md | 37 ++++++++++++++ .../server-kotlin/java/users/update-status.md | 37 ++++++++++++++ .../java/users/update-verification.md | 37 ++++++++++++++ .../account/create-recovery.md | 0 .../account/create-verification.md | 0 .../account/delete-session.md | 0 .../account/delete-sessions.md | 0 .../{examples => kotlin}/account/delete.md | 0 .../{examples => kotlin}/account/get-logs.md | 0 .../{examples => kotlin}/account/get-prefs.md | 0 .../account/get-session.md | 0 .../account/get-sessions.md | 0 .../{examples => kotlin}/account/get.md | 0 .../account/update-email.md | 0 .../account/update-name.md | 0 .../account/update-password.md | 0 .../account/update-prefs.md | 0 .../account/update-recovery.md | 0 .../account/update-verification.md | 0 .../avatars/get-browser.md | 4 +- .../avatars/get-credit-card.md | 4 +- .../avatars/get-favicon.md | 4 +- .../{examples => kotlin}/avatars/get-flag.md | 4 +- .../{examples => kotlin}/avatars/get-image.md | 4 +- .../avatars/get-initials.md | 4 +- .../{examples => kotlin}/avatars/get-q-r.md | 4 +- .../database/create-collection.md | 0 .../database/create-document.md | 0 .../database/delete-collection.md | 0 .../database/delete-document.md | 0 .../database/get-collection.md | 0 .../database/get-document.md | 0 .../database/list-collections.md | 0 .../database/list-documents.md | 0 .../database/update-collection.md | 0 .../database/update-document.md | 0 .../functions/create-execution.md | 0 .../functions/create-tag.md | 0 .../{examples => kotlin}/functions/create.md | 0 .../functions/delete-tag.md | 0 .../{examples => kotlin}/functions/delete.md | 0 .../functions/get-execution.md | 0 .../{examples => kotlin}/functions/get-tag.md | 0 .../{examples => kotlin}/functions/get.md | 0 .../functions/list-executions.md | 0 .../functions/list-tags.md | 0 .../{examples => kotlin}/functions/list.md | 0 .../functions/update-tag.md | 0 .../{examples => kotlin}/functions/update.md | 0 .../health/get-anti-virus.md | 0 .../{examples => kotlin}/health/get-cache.md | 0 .../{examples => kotlin}/health/get-d-b.md | 0 .../health/get-queue-certificates.md | 0 .../health/get-queue-functions.md | 0 .../health/get-queue-logs.md | 0 .../health/get-queue-tasks.md | 0 .../health/get-queue-usage.md | 0 .../health/get-queue-webhooks.md | 0 .../health/get-storage-local.md | 0 .../{examples => kotlin}/health/get-time.md | 0 .../{examples => kotlin}/health/get.md | 0 .../locale/get-continents.md | 0 .../locale/get-countries-e-u.md | 0 .../locale/get-countries-phones.md | 0 .../locale/get-countries.md | 0 .../locale/get-currencies.md | 0 .../locale/get-languages.md | 0 .../{examples => kotlin}/locale/get.md | 0 .../storage/create-file.md | 0 .../storage/delete-file.md | 0 .../storage/get-file-download.md | 4 +- .../storage/get-file-preview.md | 4 +- .../storage/get-file-view.md | 4 +- .../{examples => kotlin}/storage/get-file.md | 0 .../storage/list-files.md | 0 .../storage/update-file.md | 0 .../teams/create-membership.md | 0 .../{examples => kotlin}/teams/create.md | 0 .../teams/delete-membership.md | 0 .../{examples => kotlin}/teams/delete.md | 0 .../teams/get-memberships.md | 0 .../{examples => kotlin}/teams/get.md | 0 .../{examples => kotlin}/teams/list.md | 0 .../teams/update-membership-roles.md | 0 .../teams/update-membership-status.md | 0 .../{examples => kotlin}/teams/update.md | 0 .../{examples => kotlin}/users/create.md | 0 .../users/delete-session.md | 0 .../users/delete-sessions.md | 0 .../{examples => kotlin}/users/delete.md | 0 .../{examples => kotlin}/users/get-logs.md | 0 .../{examples => kotlin}/users/get-prefs.md | 0 .../users/get-sessions.md | 0 .../{examples => kotlin}/users/get.md | 0 .../{examples => kotlin}/users/list.md | 0 .../users/update-prefs.md | 0 .../users/update-status.md | 0 .../users/update-verification.md | 0 312 files changed, 6393 insertions(+), 92 deletions(-) create mode 100644 docs/examples/0.9.x/client-android/java/account/create-anonymous-session.md create mode 100644 docs/examples/0.9.x/client-android/java/account/create-j-w-t.md create mode 100644 docs/examples/0.9.x/client-android/java/account/create-o-auth2session.md create mode 100644 docs/examples/0.9.x/client-android/java/account/create-recovery.md create mode 100644 docs/examples/0.9.x/client-android/java/account/create-session.md create mode 100644 docs/examples/0.9.x/client-android/java/account/create-verification.md create mode 100644 docs/examples/0.9.x/client-android/java/account/create.md create mode 100644 docs/examples/0.9.x/client-android/java/account/delete-session.md create mode 100644 docs/examples/0.9.x/client-android/java/account/delete-sessions.md create mode 100644 docs/examples/0.9.x/client-android/java/account/delete.md create mode 100644 docs/examples/0.9.x/client-android/java/account/get-logs.md create mode 100644 docs/examples/0.9.x/client-android/java/account/get-prefs.md create mode 100644 docs/examples/0.9.x/client-android/java/account/get-session.md create mode 100644 docs/examples/0.9.x/client-android/java/account/get-sessions.md create mode 100644 docs/examples/0.9.x/client-android/java/account/get.md create mode 100644 docs/examples/0.9.x/client-android/java/account/update-email.md create mode 100644 docs/examples/0.9.x/client-android/java/account/update-name.md create mode 100644 docs/examples/0.9.x/client-android/java/account/update-password.md create mode 100644 docs/examples/0.9.x/client-android/java/account/update-prefs.md create mode 100644 docs/examples/0.9.x/client-android/java/account/update-recovery.md create mode 100644 docs/examples/0.9.x/client-android/java/account/update-verification.md create mode 100644 docs/examples/0.9.x/client-android/java/avatars/get-browser.md create mode 100644 docs/examples/0.9.x/client-android/java/avatars/get-credit-card.md create mode 100644 docs/examples/0.9.x/client-android/java/avatars/get-favicon.md create mode 100644 docs/examples/0.9.x/client-android/java/avatars/get-flag.md create mode 100644 docs/examples/0.9.x/client-android/java/avatars/get-image.md create mode 100644 docs/examples/0.9.x/client-android/java/avatars/get-initials.md create mode 100644 docs/examples/0.9.x/client-android/java/avatars/get-q-r.md create mode 100644 docs/examples/0.9.x/client-android/java/database/create-document.md create mode 100644 docs/examples/0.9.x/client-android/java/database/delete-document.md create mode 100644 docs/examples/0.9.x/client-android/java/database/get-document.md create mode 100644 docs/examples/0.9.x/client-android/java/database/list-documents.md create mode 100644 docs/examples/0.9.x/client-android/java/database/update-document.md create mode 100644 docs/examples/0.9.x/client-android/java/functions/create-execution.md create mode 100644 docs/examples/0.9.x/client-android/java/functions/get-execution.md create mode 100644 docs/examples/0.9.x/client-android/java/functions/list-executions.md create mode 100644 docs/examples/0.9.x/client-android/java/locale/get-continents.md create mode 100644 docs/examples/0.9.x/client-android/java/locale/get-countries-e-u.md create mode 100644 docs/examples/0.9.x/client-android/java/locale/get-countries-phones.md create mode 100644 docs/examples/0.9.x/client-android/java/locale/get-countries.md create mode 100644 docs/examples/0.9.x/client-android/java/locale/get-currencies.md create mode 100644 docs/examples/0.9.x/client-android/java/locale/get-languages.md create mode 100644 docs/examples/0.9.x/client-android/java/locale/get.md create mode 100644 docs/examples/0.9.x/client-android/java/storage/create-file.md create mode 100644 docs/examples/0.9.x/client-android/java/storage/delete-file.md create mode 100644 docs/examples/0.9.x/client-android/java/storage/get-file-download.md create mode 100644 docs/examples/0.9.x/client-android/java/storage/get-file-preview.md create mode 100644 docs/examples/0.9.x/client-android/java/storage/get-file-view.md create mode 100644 docs/examples/0.9.x/client-android/java/storage/get-file.md create mode 100644 docs/examples/0.9.x/client-android/java/storage/list-files.md create mode 100644 docs/examples/0.9.x/client-android/java/storage/update-file.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/create-membership.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/create.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/delete-membership.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/delete.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/get-memberships.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/get.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/list.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/update-membership-roles.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/update-membership-status.md create mode 100644 docs/examples/0.9.x/client-android/java/teams/update.md rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/create-anonymous-session.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/create-j-w-t.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/create-o-auth2session.md (87%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/create-recovery.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/create-session.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/create-verification.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/create.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/delete-session.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/delete-sessions.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/delete.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/get-logs.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/get-prefs.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/get-session.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/get-sessions.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/get.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/update-email.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/update-name.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/update-password.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/update-prefs.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/update-recovery.md (94%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/account/update-verification.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/avatars/get-browser.md (87%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/avatars/get-credit-card.md (87%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/avatars/get-favicon.md (88%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/avatars/get-flag.md (88%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/avatars/get-image.md (88%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/avatars/get-initials.md (87%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/avatars/get-q-r.md (88%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/database/create-document.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/database/delete-document.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/database/get-document.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/database/list-documents.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/database/update-document.md (94%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/functions/create-execution.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/functions/get-execution.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/functions/list-executions.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/locale/get-continents.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/locale/get-countries-e-u.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/locale/get-countries-phones.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/locale/get-countries.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/locale/get-currencies.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/locale/get-languages.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/locale/get.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/storage/create-file.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/storage/delete-file.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/storage/get-file-download.md (87%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/storage/get-file-preview.md (87%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/storage/get-file-view.md (87%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/storage/get-file.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/storage/list-files.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/storage/update-file.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/create-membership.md (94%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/create.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/delete-membership.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/delete.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/get-memberships.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/get.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/list.md (92%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/update-membership-roles.md (93%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/update-membership-status.md (94%) rename docs/examples/0.9.x/client-android/{examples => kotlin}/teams/update.md (93%) create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/create-recovery.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/create-verification.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/delete-session.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/delete-sessions.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/delete.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/get-logs.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/get-prefs.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/get-session.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/get-sessions.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/get.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/update-email.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/update-name.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/update-password.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/update-prefs.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/update-recovery.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/account/update-verification.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/avatars/get-browser.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/avatars/get-credit-card.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/avatars/get-favicon.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/avatars/get-flag.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/avatars/get-image.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/avatars/get-initials.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/avatars/get-q-r.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/create-collection.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/create-document.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/delete-collection.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/delete-document.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/get-collection.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/get-document.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/list-collections.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/list-documents.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/update-collection.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/database/update-document.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/create-execution.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/create-tag.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/create.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/delete-tag.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/delete.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/get-execution.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/get-tag.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/get.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/list-executions.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/list-tags.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/list.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/update-tag.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/functions/update.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-anti-virus.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-cache.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-d-b.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-queue-certificates.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-queue-functions.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-queue-logs.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-queue-tasks.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-queue-usage.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-queue-webhooks.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-storage-local.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get-time.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/health/get.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/locale/get-continents.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/locale/get-countries-e-u.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/locale/get-countries-phones.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/locale/get-countries.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/locale/get-currencies.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/locale/get-languages.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/locale/get.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/storage/create-file.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/storage/delete-file.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/storage/get-file-download.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/storage/get-file-preview.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/storage/get-file-view.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/storage/get-file.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/storage/list-files.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/storage/update-file.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/create-membership.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/create.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/delete-membership.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/delete.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/get-memberships.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/get.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/list.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/update-membership-roles.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/update-membership-status.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/teams/update.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/create.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/delete-session.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/delete-sessions.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/delete.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/get-logs.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/get-prefs.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/get-sessions.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/get.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/list.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/update-prefs.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/update-status.md create mode 100644 docs/examples/0.9.x/server-kotlin/java/users/update-verification.md rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/create-recovery.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/create-verification.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/delete-session.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/delete-sessions.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/delete.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/get-logs.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/get-prefs.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/get-session.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/get-sessions.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/get.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/update-email.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/update-name.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/update-password.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/update-prefs.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/update-recovery.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/account/update-verification.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/avatars/get-browser.md (82%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/avatars/get-credit-card.md (82%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/avatars/get-favicon.md (83%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/avatars/get-flag.md (83%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/avatars/get-image.md (83%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/avatars/get-initials.md (81%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/avatars/get-q-r.md (83%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/create-collection.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/create-document.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/delete-collection.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/delete-document.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/get-collection.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/get-document.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/list-collections.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/list-documents.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/update-collection.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/database/update-document.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/create-execution.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/create-tag.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/create.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/delete-tag.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/delete.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/get-execution.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/get-tag.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/get.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/list-executions.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/list-tags.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/list.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/update-tag.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/functions/update.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-anti-virus.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-cache.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-d-b.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-queue-certificates.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-queue-functions.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-queue-logs.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-queue-tasks.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-queue-usage.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-queue-webhooks.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-storage-local.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get-time.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/health/get.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/locale/get-continents.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/locale/get-countries-e-u.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/locale/get-countries-phones.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/locale/get-countries.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/locale/get-currencies.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/locale/get-languages.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/locale/get.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/storage/create-file.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/storage/delete-file.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/storage/get-file-download.md (82%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/storage/get-file-preview.md (82%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/storage/get-file-view.md (83%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/storage/get-file.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/storage/list-files.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/storage/update-file.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/create-membership.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/create.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/delete-membership.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/delete.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/get-memberships.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/get.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/list.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/update-membership-roles.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/update-membership-status.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/teams/update.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/create.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/delete-session.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/delete-sessions.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/delete.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/get-logs.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/get-prefs.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/get-sessions.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/get.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/list.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/update-prefs.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/update-status.md (100%) rename docs/examples/0.9.x/server-kotlin/{examples => kotlin}/users/update-verification.md (100%) diff --git a/docs/examples/0.9.x/client-android/java/account/create-anonymous-session.md b/docs/examples/0.9.x/client-android/java/account/create-anonymous-session.md new file mode 100644 index 0000000000..b1a2a25828 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/create-anonymous-session.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createAnonymousSession(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/create-j-w-t.md b/docs/examples/0.9.x/client-android/java/account/create-j-w-t.md new file mode 100644 index 0000000000..3a97c334ce --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/create-j-w-t.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createJWT(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/create-o-auth2session.md b/docs/examples/0.9.x/client-android/java/account/create-o-auth2session.md new file mode 100644 index 0000000000..e4cfb8d471 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/create-o-auth2session.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createOAuth2Session( + this, + "amazon", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/create-recovery.md b/docs/examples/0.9.x/client-android/java/account/create-recovery.md new file mode 100644 index 0000000000..459213bce9 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/create-recovery.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createRecovery( + "email@example.com", + "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/create-session.md b/docs/examples/0.9.x/client-android/java/account/create-session.md new file mode 100644 index 0000000000..34dfca55d8 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/create-session.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createSession( + "email@example.com", + "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/create-verification.md b/docs/examples/0.9.x/client-android/java/account/create-verification.md new file mode 100644 index 0000000000..b8b1c206bf --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/create-verification.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createVerification( + "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/create.md b/docs/examples/0.9.x/client-android/java/account/create.md new file mode 100644 index 0000000000..3ff5ab9994 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/create.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.create( + "email@example.com", + "password", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/delete-session.md b/docs/examples/0.9.x/client-android/java/account/delete-session.md new file mode 100644 index 0000000000..b3549c708b --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/delete-session.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.deleteSession( + "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/delete-sessions.md b/docs/examples/0.9.x/client-android/java/account/delete-sessions.md new file mode 100644 index 0000000000..153c323b56 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/delete-sessions.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.deleteSessions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/delete.md b/docs/examples/0.9.x/client-android/java/account/delete.md new file mode 100644 index 0000000000..aec96f1b4b --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/delete.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.delete(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/get-logs.md b/docs/examples/0.9.x/client-android/java/account/get-logs.md new file mode 100644 index 0000000000..f2dea963e2 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/get-logs.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.getLogs(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/get-prefs.md b/docs/examples/0.9.x/client-android/java/account/get-prefs.md new file mode 100644 index 0000000000..25ab6c3951 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/get-prefs.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.getPrefs(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/get-session.md b/docs/examples/0.9.x/client-android/java/account/get-session.md new file mode 100644 index 0000000000..8d4c95aaf2 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/get-session.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.getSession( + "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/get-sessions.md b/docs/examples/0.9.x/client-android/java/account/get-sessions.md new file mode 100644 index 0000000000..7afe852d71 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/get-sessions.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.getSessions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/get.md b/docs/examples/0.9.x/client-android/java/account/get.md new file mode 100644 index 0000000000..146a5e501d --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/get.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/update-email.md b/docs/examples/0.9.x/client-android/java/account/update-email.md new file mode 100644 index 0000000000..56a1bc0206 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/update-email.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateEmail( + "email@example.com", + "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/update-name.md b/docs/examples/0.9.x/client-android/java/account/update-name.md new file mode 100644 index 0000000000..9842a2216e --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/update-name.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateName( + "[NAME]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/update-password.md b/docs/examples/0.9.x/client-android/java/account/update-password.md new file mode 100644 index 0000000000..468bdc21da --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/update-password.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updatePassword( + "password", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/update-prefs.md b/docs/examples/0.9.x/client-android/java/account/update-prefs.md new file mode 100644 index 0000000000..9f94b8fe59 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/update-prefs.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updatePrefs( + mapOf( "a" to "b" ) + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/update-recovery.md b/docs/examples/0.9.x/client-android/java/account/update-recovery.md new file mode 100644 index 0000000000..bfcc89ed19 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/update-recovery.md @@ -0,0 +1,51 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateRecovery( + "[USER_ID]", + "[SECRET]", + "password", + "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/account/update-verification.md b/docs/examples/0.9.x/client-android/java/account/update-verification.md new file mode 100644 index 0000000000..8cf8d67363 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/account/update-verification.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateVerification( + "[USER_ID]", + "[SECRET]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/avatars/get-browser.md b/docs/examples/0.9.x/client-android/java/avatars/get-browser.md new file mode 100644 index 0000000000..fa88749dff --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/avatars/get-browser.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getBrowser( + "aa", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/avatars/get-credit-card.md b/docs/examples/0.9.x/client-android/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..2ddda86cce --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/avatars/get-credit-card.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getCreditCard( + "amex", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/avatars/get-favicon.md b/docs/examples/0.9.x/client-android/java/avatars/get-favicon.md new file mode 100644 index 0000000000..39c1432260 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/avatars/get-favicon.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getFavicon( + "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/avatars/get-flag.md b/docs/examples/0.9.x/client-android/java/avatars/get-flag.md new file mode 100644 index 0000000000..77bf3b1b1f --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/avatars/get-flag.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getFlag( + "af", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/avatars/get-image.md b/docs/examples/0.9.x/client-android/java/avatars/get-image.md new file mode 100644 index 0000000000..69371da6d3 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/avatars/get-image.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getImage( + "https://example.com", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/avatars/get-initials.md b/docs/examples/0.9.x/client-android/java/avatars/get-initials.md new file mode 100644 index 0000000000..eea5669c2c --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/avatars/get-initials.md @@ -0,0 +1,47 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getInitials( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/avatars/get-q-r.md b/docs/examples/0.9.x/client-android/java/avatars/get-q-r.md new file mode 100644 index 0000000000..e2c48cdded --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/avatars/get-q-r.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getQR( + "[TEXT]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/database/create-document.md b/docs/examples/0.9.x/client-android/java/database/create-document.md new file mode 100644 index 0000000000..b3a5b28e25 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/database/create-document.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.createDocument( + "[COLLECTION_ID]", + mapOf( "a" to "b" ), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/database/delete-document.md b/docs/examples/0.9.x/client-android/java/database/delete-document.md new file mode 100644 index 0000000000..75877c470a --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/database/delete-document.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.deleteDocument( + "[COLLECTION_ID]", + "[DOCUMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/database/get-document.md b/docs/examples/0.9.x/client-android/java/database/get-document.md new file mode 100644 index 0000000000..69aff1df2c --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/database/get-document.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.getDocument( + "[COLLECTION_ID]", + "[DOCUMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/database/list-documents.md b/docs/examples/0.9.x/client-android/java/database/list-documents.md new file mode 100644 index 0000000000..711aa412c0 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/database/list-documents.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.listDocuments( + "[COLLECTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/database/update-document.md b/docs/examples/0.9.x/client-android/java/database/update-document.md new file mode 100644 index 0000000000..a14c91f48c --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/database/update-document.md @@ -0,0 +1,50 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.updateDocument( + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + mapOf( "a" to "b" ), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/functions/create-execution.md b/docs/examples/0.9.x/client-android/java/functions/create-execution.md new file mode 100644 index 0000000000..ea30faddf3 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/functions/create-execution.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Functions functions = new Functions(client); + + functions.createExecution( + "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/functions/get-execution.md b/docs/examples/0.9.x/client-android/java/functions/get-execution.md new file mode 100644 index 0000000000..2f4e57edce --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/functions/get-execution.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Functions functions = new Functions(client); + + functions.getExecution( + "[FUNCTION_ID]", + "[EXECUTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/functions/list-executions.md b/docs/examples/0.9.x/client-android/java/functions/list-executions.md new file mode 100644 index 0000000000..68f767db9c --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/functions/list-executions.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Functions functions = new Functions(client); + + functions.listExecutions( + "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/locale/get-continents.md b/docs/examples/0.9.x/client-android/java/locale/get-continents.md new file mode 100644 index 0000000000..e96a9fec1e --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/locale/get-continents.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getContinents(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/locale/get-countries-e-u.md b/docs/examples/0.9.x/client-android/java/locale/get-countries-e-u.md new file mode 100644 index 0000000000..ec478bc839 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/locale/get-countries-e-u.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getCountriesEU(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/locale/get-countries-phones.md b/docs/examples/0.9.x/client-android/java/locale/get-countries-phones.md new file mode 100644 index 0000000000..34368d2877 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/locale/get-countries-phones.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getCountriesPhones(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/locale/get-countries.md b/docs/examples/0.9.x/client-android/java/locale/get-countries.md new file mode 100644 index 0000000000..f1c50fc8d1 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/locale/get-countries.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getCountries(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/locale/get-currencies.md b/docs/examples/0.9.x/client-android/java/locale/get-currencies.md new file mode 100644 index 0000000000..63af14bbb3 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/locale/get-currencies.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getCurrencies(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/locale/get-languages.md b/docs/examples/0.9.x/client-android/java/locale/get-languages.md new file mode 100644 index 0000000000..5952daafef --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/locale/get-languages.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getLanguages(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/locale/get.md b/docs/examples/0.9.x/client-android/java/locale/get.md new file mode 100644 index 0000000000..417fc16f23 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/locale/get.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/storage/create-file.md b/docs/examples/0.9.x/client-android/java/storage/create-file.md new file mode 100644 index 0000000000..172ef7ea1b --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/storage/create-file.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.createFile( + File("./path-to-files/image.jpg"), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/storage/delete-file.md b/docs/examples/0.9.x/client-android/java/storage/delete-file.md new file mode 100644 index 0000000000..aafae2ce65 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/storage/delete-file.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.deleteFile( + "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/storage/get-file-download.md b/docs/examples/0.9.x/client-android/java/storage/get-file-download.md new file mode 100644 index 0000000000..d56f2934a0 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/storage/get-file-download.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.getFileDownload( + "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/storage/get-file-preview.md b/docs/examples/0.9.x/client-android/java/storage/get-file-preview.md new file mode 100644 index 0000000000..00b54f220b --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/storage/get-file-preview.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.getFilePreview( + "[FILE_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/storage/get-file-view.md b/docs/examples/0.9.x/client-android/java/storage/get-file-view.md new file mode 100644 index 0000000000..087a48b1bc --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/storage/get-file-view.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.getFileView( + "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/storage/get-file.md b/docs/examples/0.9.x/client-android/java/storage/get-file.md new file mode 100644 index 0000000000..9473cab274 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/storage/get-file.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.getFile( + "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/storage/list-files.md b/docs/examples/0.9.x/client-android/java/storage/list-files.md new file mode 100644 index 0000000000..e2eab69d8b --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/storage/list-files.md @@ -0,0 +1,47 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.listFiles( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/storage/update-file.md b/docs/examples/0.9.x/client-android/java/storage/update-file.md new file mode 100644 index 0000000000..1477615e21 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/storage/update-file.md @@ -0,0 +1,50 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.updateFile( + "[FILE_ID]", + listOf(), + listOf() + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/create-membership.md b/docs/examples/0.9.x/client-android/java/teams/create-membership.md new file mode 100644 index 0000000000..f4d96de575 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/create-membership.md @@ -0,0 +1,51 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.createMembership( + "[TEAM_ID]", + "email@example.com", + listOf(), + "https://example.com", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/create.md b/docs/examples/0.9.x/client-android/java/teams/create.md new file mode 100644 index 0000000000..a715c0a41a --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/create.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.create( + "[NAME]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/delete-membership.md b/docs/examples/0.9.x/client-android/java/teams/delete-membership.md new file mode 100644 index 0000000000..98cb29ac75 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/delete-membership.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.deleteMembership( + "[TEAM_ID]", + "[MEMBERSHIP_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/delete.md b/docs/examples/0.9.x/client-android/java/teams/delete.md new file mode 100644 index 0000000000..828b457217 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/delete.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.delete( + "[TEAM_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/get-memberships.md b/docs/examples/0.9.x/client-android/java/teams/get-memberships.md new file mode 100644 index 0000000000..d8a4100b98 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/get-memberships.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.getMemberships( + "[TEAM_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/get.md b/docs/examples/0.9.x/client-android/java/teams/get.md new file mode 100644 index 0000000000..53ba33c4ca --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/get.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.get( + "[TEAM_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/list.md b/docs/examples/0.9.x/client-android/java/teams/list.md new file mode 100644 index 0000000000..61c2aa3f8e --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/list.md @@ -0,0 +1,47 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.list( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/update-membership-roles.md b/docs/examples/0.9.x/client-android/java/teams/update-membership-roles.md new file mode 100644 index 0000000000..ef6c67307e --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/update-membership-roles.md @@ -0,0 +1,50 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.updateMembershipRoles( + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + listOf() + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/update-membership-status.md b/docs/examples/0.9.x/client-android/java/teams/update-membership-status.md new file mode 100644 index 0000000000..447d0da2c9 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/update-membership-status.md @@ -0,0 +1,51 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.updateMembershipStatus( + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + "[USER_ID]", + "[SECRET]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/java/teams/update.md b/docs/examples/0.9.x/client-android/java/teams/update.md new file mode 100644 index 0000000000..b4df429a07 --- /dev/null +++ b/docs/examples/0.9.x/client-android/java/teams/update.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.update( + "[TEAM_ID]", + "[NAME]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/create-anonymous-session.md b/docs/examples/0.9.x/client-android/kotlin/account/create-anonymous-session.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/account/create-anonymous-session.md rename to docs/examples/0.9.x/client-android/kotlin/account/create-anonymous-session.md index 80ce88f3b9..5fa06994fb 100644 --- a/docs/examples/0.9.x/client-android/examples/account/create-anonymous-session.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/create-anonymous-session.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = account.createAnonymousSession() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/create-j-w-t.md b/docs/examples/0.9.x/client-android/kotlin/account/create-j-w-t.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/account/create-j-w-t.md rename to docs/examples/0.9.x/client-android/kotlin/account/create-j-w-t.md index cae8e9ba67..212838b7fd 100644 --- a/docs/examples/0.9.x/client-android/examples/account/create-j-w-t.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/create-j-w-t.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = account.createJWT() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/create-o-auth2session.md b/docs/examples/0.9.x/client-android/kotlin/account/create-o-auth2session.md similarity index 87% rename from docs/examples/0.9.x/client-android/examples/account/create-o-auth2session.md rename to docs/examples/0.9.x/client-android/kotlin/account/create-o-auth2session.md index ed9782e538..baf993069a 100644 --- a/docs/examples/0.9.x/client-android/examples/account/create-o-auth2session.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/create-o-auth2session.md @@ -17,10 +17,11 @@ class MainActivity : AppCompatActivity() { val account = Account(client) GlobalScope.launch { - val response = account.createOAuth2Session( + account.createOAuth2Session( + activity = this@MainActivity, provider = "amazon", ) - val json = response.body?.string() + } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/create-recovery.md b/docs/examples/0.9.x/client-android/kotlin/account/create-recovery.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/create-recovery.md rename to docs/examples/0.9.x/client-android/kotlin/account/create-recovery.md index f5eddf9e18..2c1e7597b9 100644 --- a/docs/examples/0.9.x/client-android/examples/account/create-recovery.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/create-recovery.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { email = "email@example.com", url = "https://example.com" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/create-session.md b/docs/examples/0.9.x/client-android/kotlin/account/create-session.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/create-session.md rename to docs/examples/0.9.x/client-android/kotlin/account/create-session.md index b1d70277d8..4999232e5b 100644 --- a/docs/examples/0.9.x/client-android/examples/account/create-session.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/create-session.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { email = "email@example.com", password = "password" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/create-verification.md b/docs/examples/0.9.x/client-android/kotlin/account/create-verification.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/create-verification.md rename to docs/examples/0.9.x/client-android/kotlin/account/create-verification.md index 322abfac8f..1ebddee5cf 100644 --- a/docs/examples/0.9.x/client-android/examples/account/create-verification.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/create-verification.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = account.createVerification( url = "https://example.com" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/create.md b/docs/examples/0.9.x/client-android/kotlin/account/create.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/create.md rename to docs/examples/0.9.x/client-android/kotlin/account/create.md index 49c08c4543..a8528ecf39 100644 --- a/docs/examples/0.9.x/client-android/examples/account/create.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/create.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { email = "email@example.com", password = "password", ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/delete-session.md b/docs/examples/0.9.x/client-android/kotlin/account/delete-session.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/delete-session.md rename to docs/examples/0.9.x/client-android/kotlin/account/delete-session.md index 2d5bfd27e6..e670623490 100644 --- a/docs/examples/0.9.x/client-android/examples/account/delete-session.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/delete-session.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = account.deleteSession( sessionId = "[SESSION_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/delete-sessions.md b/docs/examples/0.9.x/client-android/kotlin/account/delete-sessions.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/account/delete-sessions.md rename to docs/examples/0.9.x/client-android/kotlin/account/delete-sessions.md index 1d451eccec..ec30efdb8f 100644 --- a/docs/examples/0.9.x/client-android/examples/account/delete-sessions.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/delete-sessions.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = account.deleteSessions() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/delete.md b/docs/examples/0.9.x/client-android/kotlin/account/delete.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/account/delete.md rename to docs/examples/0.9.x/client-android/kotlin/account/delete.md index 962dda3095..7bfe95e88c 100644 --- a/docs/examples/0.9.x/client-android/examples/account/delete.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/delete.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = account.delete() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/get-logs.md b/docs/examples/0.9.x/client-android/kotlin/account/get-logs.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/account/get-logs.md rename to docs/examples/0.9.x/client-android/kotlin/account/get-logs.md index 0515eb8b9c..9f79f0a790 100644 --- a/docs/examples/0.9.x/client-android/examples/account/get-logs.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/get-logs.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = account.getLogs() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/get-prefs.md b/docs/examples/0.9.x/client-android/kotlin/account/get-prefs.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/account/get-prefs.md rename to docs/examples/0.9.x/client-android/kotlin/account/get-prefs.md index efab1b6179..9378cd2456 100644 --- a/docs/examples/0.9.x/client-android/examples/account/get-prefs.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/get-prefs.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = account.getPrefs() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/get-session.md b/docs/examples/0.9.x/client-android/kotlin/account/get-session.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/get-session.md rename to docs/examples/0.9.x/client-android/kotlin/account/get-session.md index 8451d23b13..45f00b69fc 100644 --- a/docs/examples/0.9.x/client-android/examples/account/get-session.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/get-session.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = account.getSession( sessionId = "[SESSION_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/get-sessions.md b/docs/examples/0.9.x/client-android/kotlin/account/get-sessions.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/account/get-sessions.md rename to docs/examples/0.9.x/client-android/kotlin/account/get-sessions.md index ca2723fe0d..4f939cc162 100644 --- a/docs/examples/0.9.x/client-android/examples/account/get-sessions.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/get-sessions.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = account.getSessions() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/get.md b/docs/examples/0.9.x/client-android/kotlin/account/get.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/account/get.md rename to docs/examples/0.9.x/client-android/kotlin/account/get.md index 96c7ff7324..c4c81a20aa 100644 --- a/docs/examples/0.9.x/client-android/examples/account/get.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/get.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = account.get() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/update-email.md b/docs/examples/0.9.x/client-android/kotlin/account/update-email.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/update-email.md rename to docs/examples/0.9.x/client-android/kotlin/account/update-email.md index b6d3615ce8..a9ec88b8a4 100644 --- a/docs/examples/0.9.x/client-android/examples/account/update-email.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/update-email.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { email = "email@example.com", password = "password" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/update-name.md b/docs/examples/0.9.x/client-android/kotlin/account/update-name.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/update-name.md rename to docs/examples/0.9.x/client-android/kotlin/account/update-name.md index 0ab74e42fa..ce9d8a368f 100644 --- a/docs/examples/0.9.x/client-android/examples/account/update-name.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/update-name.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = account.updateName( name = "[NAME]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/update-password.md b/docs/examples/0.9.x/client-android/kotlin/account/update-password.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/update-password.md rename to docs/examples/0.9.x/client-android/kotlin/account/update-password.md index 9c21ca790e..edee78eab9 100644 --- a/docs/examples/0.9.x/client-android/examples/account/update-password.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/update-password.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = account.updatePassword( password = "password", ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/update-prefs.md b/docs/examples/0.9.x/client-android/kotlin/account/update-prefs.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/update-prefs.md rename to docs/examples/0.9.x/client-android/kotlin/account/update-prefs.md index 481cc8064c..3059bc8196 100644 --- a/docs/examples/0.9.x/client-android/examples/account/update-prefs.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/update-prefs.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = account.updatePrefs( prefs = mapOf( "a" to "b" ) ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/update-recovery.md b/docs/examples/0.9.x/client-android/kotlin/account/update-recovery.md similarity index 94% rename from docs/examples/0.9.x/client-android/examples/account/update-recovery.md rename to docs/examples/0.9.x/client-android/kotlin/account/update-recovery.md index 726e8ad668..81c00b4f26 100644 --- a/docs/examples/0.9.x/client-android/examples/account/update-recovery.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/update-recovery.md @@ -23,7 +23,7 @@ class MainActivity : AppCompatActivity() { password = "password", passwordAgain = "password" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/account/update-verification.md b/docs/examples/0.9.x/client-android/kotlin/account/update-verification.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/account/update-verification.md rename to docs/examples/0.9.x/client-android/kotlin/account/update-verification.md index 832314a984..cea2592a73 100644 --- a/docs/examples/0.9.x/client-android/examples/account/update-verification.md +++ b/docs/examples/0.9.x/client-android/kotlin/account/update-verification.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { userId = "[USER_ID]", secret = "[SECRET]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/avatars/get-browser.md b/docs/examples/0.9.x/client-android/kotlin/avatars/get-browser.md similarity index 87% rename from docs/examples/0.9.x/client-android/examples/avatars/get-browser.md rename to docs/examples/0.9.x/client-android/kotlin/avatars/get-browser.md index 15e765ed43..95a2201d6a 100644 --- a/docs/examples/0.9.x/client-android/examples/avatars/get-browser.md +++ b/docs/examples/0.9.x/client-android/kotlin/avatars/get-browser.md @@ -17,10 +17,10 @@ class MainActivity : AppCompatActivity() { val avatars = Avatars(client) GlobalScope.launch { - val response = avatars.getBrowser( + val result = avatars.getBrowser( code = "aa", ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/avatars/get-credit-card.md b/docs/examples/0.9.x/client-android/kotlin/avatars/get-credit-card.md similarity index 87% rename from docs/examples/0.9.x/client-android/examples/avatars/get-credit-card.md rename to docs/examples/0.9.x/client-android/kotlin/avatars/get-credit-card.md index b31587bea4..7507c40c5c 100644 --- a/docs/examples/0.9.x/client-android/examples/avatars/get-credit-card.md +++ b/docs/examples/0.9.x/client-android/kotlin/avatars/get-credit-card.md @@ -17,10 +17,10 @@ class MainActivity : AppCompatActivity() { val avatars = Avatars(client) GlobalScope.launch { - val response = avatars.getCreditCard( + val result = avatars.getCreditCard( code = "amex", ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/avatars/get-favicon.md b/docs/examples/0.9.x/client-android/kotlin/avatars/get-favicon.md similarity index 88% rename from docs/examples/0.9.x/client-android/examples/avatars/get-favicon.md rename to docs/examples/0.9.x/client-android/kotlin/avatars/get-favicon.md index d17aab995d..f8e2b400a8 100644 --- a/docs/examples/0.9.x/client-android/examples/avatars/get-favicon.md +++ b/docs/examples/0.9.x/client-android/kotlin/avatars/get-favicon.md @@ -17,10 +17,10 @@ class MainActivity : AppCompatActivity() { val avatars = Avatars(client) GlobalScope.launch { - val response = avatars.getFavicon( + val result = avatars.getFavicon( url = "https://example.com" ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/avatars/get-flag.md b/docs/examples/0.9.x/client-android/kotlin/avatars/get-flag.md similarity index 88% rename from docs/examples/0.9.x/client-android/examples/avatars/get-flag.md rename to docs/examples/0.9.x/client-android/kotlin/avatars/get-flag.md index 7579ba0cf1..738ec8a91f 100644 --- a/docs/examples/0.9.x/client-android/examples/avatars/get-flag.md +++ b/docs/examples/0.9.x/client-android/kotlin/avatars/get-flag.md @@ -17,10 +17,10 @@ class MainActivity : AppCompatActivity() { val avatars = Avatars(client) GlobalScope.launch { - val response = avatars.getFlag( + val result = avatars.getFlag( code = "af", ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/avatars/get-image.md b/docs/examples/0.9.x/client-android/kotlin/avatars/get-image.md similarity index 88% rename from docs/examples/0.9.x/client-android/examples/avatars/get-image.md rename to docs/examples/0.9.x/client-android/kotlin/avatars/get-image.md index 21da7eeb7f..25171b1447 100644 --- a/docs/examples/0.9.x/client-android/examples/avatars/get-image.md +++ b/docs/examples/0.9.x/client-android/kotlin/avatars/get-image.md @@ -17,10 +17,10 @@ class MainActivity : AppCompatActivity() { val avatars = Avatars(client) GlobalScope.launch { - val response = avatars.getImage( + val result = avatars.getImage( url = "https://example.com", ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/avatars/get-initials.md b/docs/examples/0.9.x/client-android/kotlin/avatars/get-initials.md similarity index 87% rename from docs/examples/0.9.x/client-android/examples/avatars/get-initials.md rename to docs/examples/0.9.x/client-android/kotlin/avatars/get-initials.md index e0cdc47f25..e53a647b09 100644 --- a/docs/examples/0.9.x/client-android/examples/avatars/get-initials.md +++ b/docs/examples/0.9.x/client-android/kotlin/avatars/get-initials.md @@ -17,9 +17,9 @@ class MainActivity : AppCompatActivity() { val avatars = Avatars(client) GlobalScope.launch { - val response = avatars.getInitials( + val result = avatars.getInitials( ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/avatars/get-q-r.md b/docs/examples/0.9.x/client-android/kotlin/avatars/get-q-r.md similarity index 88% rename from docs/examples/0.9.x/client-android/examples/avatars/get-q-r.md rename to docs/examples/0.9.x/client-android/kotlin/avatars/get-q-r.md index e33584c452..c9d60ea9c7 100644 --- a/docs/examples/0.9.x/client-android/examples/avatars/get-q-r.md +++ b/docs/examples/0.9.x/client-android/kotlin/avatars/get-q-r.md @@ -17,10 +17,10 @@ class MainActivity : AppCompatActivity() { val avatars = Avatars(client) GlobalScope.launch { - val response = avatars.getQR( + val result = avatars.getQR( text = "[TEXT]", ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/database/create-document.md b/docs/examples/0.9.x/client-android/kotlin/database/create-document.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/database/create-document.md rename to docs/examples/0.9.x/client-android/kotlin/database/create-document.md index efae56ef5d..72ec7adab4 100644 --- a/docs/examples/0.9.x/client-android/examples/database/create-document.md +++ b/docs/examples/0.9.x/client-android/kotlin/database/create-document.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { collectionId = "[COLLECTION_ID]", data = mapOf( "a" to "b" ), ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/database/delete-document.md b/docs/examples/0.9.x/client-android/kotlin/database/delete-document.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/database/delete-document.md rename to docs/examples/0.9.x/client-android/kotlin/database/delete-document.md index a3e91c43e4..49a85c8ebb 100644 --- a/docs/examples/0.9.x/client-android/examples/database/delete-document.md +++ b/docs/examples/0.9.x/client-android/kotlin/database/delete-document.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { collectionId = "[COLLECTION_ID]", documentId = "[DOCUMENT_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/database/get-document.md b/docs/examples/0.9.x/client-android/kotlin/database/get-document.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/database/get-document.md rename to docs/examples/0.9.x/client-android/kotlin/database/get-document.md index 0b8b2b1a4f..3dd65c085d 100644 --- a/docs/examples/0.9.x/client-android/examples/database/get-document.md +++ b/docs/examples/0.9.x/client-android/kotlin/database/get-document.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { collectionId = "[COLLECTION_ID]", documentId = "[DOCUMENT_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/database/list-documents.md b/docs/examples/0.9.x/client-android/kotlin/database/list-documents.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/database/list-documents.md rename to docs/examples/0.9.x/client-android/kotlin/database/list-documents.md index d334283904..65119819fd 100644 --- a/docs/examples/0.9.x/client-android/examples/database/list-documents.md +++ b/docs/examples/0.9.x/client-android/kotlin/database/list-documents.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = database.listDocuments( collectionId = "[COLLECTION_ID]", ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/database/update-document.md b/docs/examples/0.9.x/client-android/kotlin/database/update-document.md similarity index 94% rename from docs/examples/0.9.x/client-android/examples/database/update-document.md rename to docs/examples/0.9.x/client-android/kotlin/database/update-document.md index 2c62eb9061..e19ce4a994 100644 --- a/docs/examples/0.9.x/client-android/examples/database/update-document.md +++ b/docs/examples/0.9.x/client-android/kotlin/database/update-document.md @@ -22,7 +22,7 @@ class MainActivity : AppCompatActivity() { documentId = "[DOCUMENT_ID]", data = mapOf( "a" to "b" ), ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/functions/create-execution.md b/docs/examples/0.9.x/client-android/kotlin/functions/create-execution.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/functions/create-execution.md rename to docs/examples/0.9.x/client-android/kotlin/functions/create-execution.md index f9bad8dd3d..3a7e599f8c 100644 --- a/docs/examples/0.9.x/client-android/examples/functions/create-execution.md +++ b/docs/examples/0.9.x/client-android/kotlin/functions/create-execution.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = functions.createExecution( functionId = "[FUNCTION_ID]", ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/functions/get-execution.md b/docs/examples/0.9.x/client-android/kotlin/functions/get-execution.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/functions/get-execution.md rename to docs/examples/0.9.x/client-android/kotlin/functions/get-execution.md index ee2b48c8e8..781f26c743 100644 --- a/docs/examples/0.9.x/client-android/examples/functions/get-execution.md +++ b/docs/examples/0.9.x/client-android/kotlin/functions/get-execution.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { functionId = "[FUNCTION_ID]", executionId = "[EXECUTION_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/functions/list-executions.md b/docs/examples/0.9.x/client-android/kotlin/functions/list-executions.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/functions/list-executions.md rename to docs/examples/0.9.x/client-android/kotlin/functions/list-executions.md index 43e6573783..4f11574f0d 100644 --- a/docs/examples/0.9.x/client-android/examples/functions/list-executions.md +++ b/docs/examples/0.9.x/client-android/kotlin/functions/list-executions.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = functions.listExecutions( functionId = "[FUNCTION_ID]", ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/locale/get-continents.md b/docs/examples/0.9.x/client-android/kotlin/locale/get-continents.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/locale/get-continents.md rename to docs/examples/0.9.x/client-android/kotlin/locale/get-continents.md index 9e69797b6c..faf1448d73 100644 --- a/docs/examples/0.9.x/client-android/examples/locale/get-continents.md +++ b/docs/examples/0.9.x/client-android/kotlin/locale/get-continents.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = locale.getContinents() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/locale/get-countries-e-u.md b/docs/examples/0.9.x/client-android/kotlin/locale/get-countries-e-u.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/locale/get-countries-e-u.md rename to docs/examples/0.9.x/client-android/kotlin/locale/get-countries-e-u.md index 146fcb4948..5a3552f1a7 100644 --- a/docs/examples/0.9.x/client-android/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.9.x/client-android/kotlin/locale/get-countries-e-u.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = locale.getCountriesEU() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/locale/get-countries-phones.md b/docs/examples/0.9.x/client-android/kotlin/locale/get-countries-phones.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/locale/get-countries-phones.md rename to docs/examples/0.9.x/client-android/kotlin/locale/get-countries-phones.md index 71179957e7..565097ef4b 100644 --- a/docs/examples/0.9.x/client-android/examples/locale/get-countries-phones.md +++ b/docs/examples/0.9.x/client-android/kotlin/locale/get-countries-phones.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = locale.getCountriesPhones() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/locale/get-countries.md b/docs/examples/0.9.x/client-android/kotlin/locale/get-countries.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/locale/get-countries.md rename to docs/examples/0.9.x/client-android/kotlin/locale/get-countries.md index 56d84188b1..e327c14ab8 100644 --- a/docs/examples/0.9.x/client-android/examples/locale/get-countries.md +++ b/docs/examples/0.9.x/client-android/kotlin/locale/get-countries.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = locale.getCountries() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/locale/get-currencies.md b/docs/examples/0.9.x/client-android/kotlin/locale/get-currencies.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/locale/get-currencies.md rename to docs/examples/0.9.x/client-android/kotlin/locale/get-currencies.md index a4bb2b6a1c..00e11999e6 100644 --- a/docs/examples/0.9.x/client-android/examples/locale/get-currencies.md +++ b/docs/examples/0.9.x/client-android/kotlin/locale/get-currencies.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = locale.getCurrencies() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/locale/get-languages.md b/docs/examples/0.9.x/client-android/kotlin/locale/get-languages.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/locale/get-languages.md rename to docs/examples/0.9.x/client-android/kotlin/locale/get-languages.md index ed1d41a54d..796747a00d 100644 --- a/docs/examples/0.9.x/client-android/examples/locale/get-languages.md +++ b/docs/examples/0.9.x/client-android/kotlin/locale/get-languages.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = locale.getLanguages() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/locale/get.md b/docs/examples/0.9.x/client-android/kotlin/locale/get.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/locale/get.md rename to docs/examples/0.9.x/client-android/kotlin/locale/get.md index fb6bf9858d..f89c66a7ed 100644 --- a/docs/examples/0.9.x/client-android/examples/locale/get.md +++ b/docs/examples/0.9.x/client-android/kotlin/locale/get.md @@ -18,7 +18,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = locale.get() - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/storage/create-file.md b/docs/examples/0.9.x/client-android/kotlin/storage/create-file.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/storage/create-file.md rename to docs/examples/0.9.x/client-android/kotlin/storage/create-file.md index 680e332419..92a5e957ae 100644 --- a/docs/examples/0.9.x/client-android/examples/storage/create-file.md +++ b/docs/examples/0.9.x/client-android/kotlin/storage/create-file.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = storage.createFile( file = File("./path-to-files/image.jpg"), ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/storage/delete-file.md b/docs/examples/0.9.x/client-android/kotlin/storage/delete-file.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/storage/delete-file.md rename to docs/examples/0.9.x/client-android/kotlin/storage/delete-file.md index 7fcb393491..f26acacc21 100644 --- a/docs/examples/0.9.x/client-android/examples/storage/delete-file.md +++ b/docs/examples/0.9.x/client-android/kotlin/storage/delete-file.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = storage.deleteFile( fileId = "[FILE_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/storage/get-file-download.md b/docs/examples/0.9.x/client-android/kotlin/storage/get-file-download.md similarity index 87% rename from docs/examples/0.9.x/client-android/examples/storage/get-file-download.md rename to docs/examples/0.9.x/client-android/kotlin/storage/get-file-download.md index 3c4bfba324..b7d3d4a691 100644 --- a/docs/examples/0.9.x/client-android/examples/storage/get-file-download.md +++ b/docs/examples/0.9.x/client-android/kotlin/storage/get-file-download.md @@ -17,10 +17,10 @@ class MainActivity : AppCompatActivity() { val storage = Storage(client) GlobalScope.launch { - val response = storage.getFileDownload( + val result = storage.getFileDownload( fileId = "[FILE_ID]" ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/storage/get-file-preview.md b/docs/examples/0.9.x/client-android/kotlin/storage/get-file-preview.md similarity index 87% rename from docs/examples/0.9.x/client-android/examples/storage/get-file-preview.md rename to docs/examples/0.9.x/client-android/kotlin/storage/get-file-preview.md index 2a4d30e9bd..9f1d459139 100644 --- a/docs/examples/0.9.x/client-android/examples/storage/get-file-preview.md +++ b/docs/examples/0.9.x/client-android/kotlin/storage/get-file-preview.md @@ -17,10 +17,10 @@ class MainActivity : AppCompatActivity() { val storage = Storage(client) GlobalScope.launch { - val response = storage.getFilePreview( + val result = storage.getFilePreview( fileId = "[FILE_ID]", ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/storage/get-file-view.md b/docs/examples/0.9.x/client-android/kotlin/storage/get-file-view.md similarity index 87% rename from docs/examples/0.9.x/client-android/examples/storage/get-file-view.md rename to docs/examples/0.9.x/client-android/kotlin/storage/get-file-view.md index de752a953a..0b4fe07f47 100644 --- a/docs/examples/0.9.x/client-android/examples/storage/get-file-view.md +++ b/docs/examples/0.9.x/client-android/kotlin/storage/get-file-view.md @@ -17,10 +17,10 @@ class MainActivity : AppCompatActivity() { val storage = Storage(client) GlobalScope.launch { - val response = storage.getFileView( + val result = storage.getFileView( fileId = "[FILE_ID]" ) - val json = response.body?.string() + println(result); // Resource URL } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/storage/get-file.md b/docs/examples/0.9.x/client-android/kotlin/storage/get-file.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/storage/get-file.md rename to docs/examples/0.9.x/client-android/kotlin/storage/get-file.md index b2657e843c..b534d3befa 100644 --- a/docs/examples/0.9.x/client-android/examples/storage/get-file.md +++ b/docs/examples/0.9.x/client-android/kotlin/storage/get-file.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = storage.getFile( fileId = "[FILE_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/storage/list-files.md b/docs/examples/0.9.x/client-android/kotlin/storage/list-files.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/storage/list-files.md rename to docs/examples/0.9.x/client-android/kotlin/storage/list-files.md index 0b43d3b432..7d63837a67 100644 --- a/docs/examples/0.9.x/client-android/examples/storage/list-files.md +++ b/docs/examples/0.9.x/client-android/kotlin/storage/list-files.md @@ -19,7 +19,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = storage.listFiles( ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/storage/update-file.md b/docs/examples/0.9.x/client-android/kotlin/storage/update-file.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/storage/update-file.md rename to docs/examples/0.9.x/client-android/kotlin/storage/update-file.md index 94e492a523..31dfb38b3e 100644 --- a/docs/examples/0.9.x/client-android/examples/storage/update-file.md +++ b/docs/examples/0.9.x/client-android/kotlin/storage/update-file.md @@ -22,7 +22,7 @@ class MainActivity : AppCompatActivity() { read = listOf(), write = listOf() ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/create-membership.md b/docs/examples/0.9.x/client-android/kotlin/teams/create-membership.md similarity index 94% rename from docs/examples/0.9.x/client-android/examples/teams/create-membership.md rename to docs/examples/0.9.x/client-android/kotlin/teams/create-membership.md index 4c9b2c4be1..e2b7d16bfc 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/create-membership.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/create-membership.md @@ -23,7 +23,7 @@ class MainActivity : AppCompatActivity() { roles = listOf(), url = "https://example.com", ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/create.md b/docs/examples/0.9.x/client-android/kotlin/teams/create.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/teams/create.md rename to docs/examples/0.9.x/client-android/kotlin/teams/create.md index 6b53502ead..068fbd66c4 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/create.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/create.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = teams.create( name = "[NAME]", ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/delete-membership.md b/docs/examples/0.9.x/client-android/kotlin/teams/delete-membership.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/teams/delete-membership.md rename to docs/examples/0.9.x/client-android/kotlin/teams/delete-membership.md index 099583196f..6545af5de7 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/delete-membership.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/delete-membership.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { teamId = "[TEAM_ID]", membershipId = "[MEMBERSHIP_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/delete.md b/docs/examples/0.9.x/client-android/kotlin/teams/delete.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/teams/delete.md rename to docs/examples/0.9.x/client-android/kotlin/teams/delete.md index a5c0d1469e..de12449562 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/delete.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/delete.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = teams.delete( teamId = "[TEAM_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/get-memberships.md b/docs/examples/0.9.x/client-android/kotlin/teams/get-memberships.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/teams/get-memberships.md rename to docs/examples/0.9.x/client-android/kotlin/teams/get-memberships.md index a16950a227..89b4f54559 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/get-memberships.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/get-memberships.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = teams.getMemberships( teamId = "[TEAM_ID]", ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/get.md b/docs/examples/0.9.x/client-android/kotlin/teams/get.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/teams/get.md rename to docs/examples/0.9.x/client-android/kotlin/teams/get.md index ecbed31524..54550b3ed6 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/get.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/get.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = teams.get( teamId = "[TEAM_ID]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/list.md b/docs/examples/0.9.x/client-android/kotlin/teams/list.md similarity index 92% rename from docs/examples/0.9.x/client-android/examples/teams/list.md rename to docs/examples/0.9.x/client-android/kotlin/teams/list.md index 3d25f922b8..6444205472 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/list.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/list.md @@ -19,7 +19,7 @@ class MainActivity : AppCompatActivity() { GlobalScope.launch { val response = teams.list( ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/update-membership-roles.md b/docs/examples/0.9.x/client-android/kotlin/teams/update-membership-roles.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/teams/update-membership-roles.md rename to docs/examples/0.9.x/client-android/kotlin/teams/update-membership-roles.md index acc874eb22..d9a8a41895 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/update-membership-roles.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/update-membership-roles.md @@ -22,7 +22,7 @@ class MainActivity : AppCompatActivity() { membershipId = "[MEMBERSHIP_ID]", roles = listOf() ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/update-membership-status.md b/docs/examples/0.9.x/client-android/kotlin/teams/update-membership-status.md similarity index 94% rename from docs/examples/0.9.x/client-android/examples/teams/update-membership-status.md rename to docs/examples/0.9.x/client-android/kotlin/teams/update-membership-status.md index 94dfd88fde..f8e10fdafc 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/update-membership-status.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/update-membership-status.md @@ -23,7 +23,7 @@ class MainActivity : AppCompatActivity() { userId = "[USER_ID]", secret = "[SECRET]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/client-android/examples/teams/update.md b/docs/examples/0.9.x/client-android/kotlin/teams/update.md similarity index 93% rename from docs/examples/0.9.x/client-android/examples/teams/update.md rename to docs/examples/0.9.x/client-android/kotlin/teams/update.md index a9a2c49bf6..59dd69f081 100644 --- a/docs/examples/0.9.x/client-android/examples/teams/update.md +++ b/docs/examples/0.9.x/client-android/kotlin/teams/update.md @@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() { teamId = "[TEAM_ID]", name = "[NAME]" ) - val json = response.body?.string() + val json = response.body?.string() } } } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/create-recovery.md b/docs/examples/0.9.x/server-kotlin/java/account/create-recovery.md new file mode 100644 index 0000000000..83fbe91a95 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/create-recovery.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.createRecovery( + email = "email@example.com", + url = "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/create-verification.md b/docs/examples/0.9.x/server-kotlin/java/account/create-verification.md new file mode 100644 index 0000000000..2ca770e2e1 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/create-verification.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.createVerification( + url = "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/delete-session.md b/docs/examples/0.9.x/server-kotlin/java/account/delete-session.md new file mode 100644 index 0000000000..bb925a77e3 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/delete-session.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.deleteSession( + sessionId = "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/delete-sessions.md b/docs/examples/0.9.x/server-kotlin/java/account/delete-sessions.md new file mode 100644 index 0000000000..4cda782b99 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/delete-sessions.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.deleteSessions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/delete.md b/docs/examples/0.9.x/server-kotlin/java/account/delete.md new file mode 100644 index 0000000000..bec268b8e0 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/delete.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.delete(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get-logs.md b/docs/examples/0.9.x/server-kotlin/java/account/get-logs.md new file mode 100644 index 0000000000..1d0f604519 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/get-logs.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.getLogs(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get-prefs.md b/docs/examples/0.9.x/server-kotlin/java/account/get-prefs.md new file mode 100644 index 0000000000..501e2d08c7 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/get-prefs.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.getPrefs(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get-session.md b/docs/examples/0.9.x/server-kotlin/java/account/get-session.md new file mode 100644 index 0000000000..6f3e9e1a82 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/get-session.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.getSession( + sessionId = "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get-sessions.md b/docs/examples/0.9.x/server-kotlin/java/account/get-sessions.md new file mode 100644 index 0000000000..1f42599185 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/get-sessions.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.getSessions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get.md b/docs/examples/0.9.x/server-kotlin/java/account/get.md new file mode 100644 index 0000000000..2429a5d5d9 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/get.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-email.md b/docs/examples/0.9.x/server-kotlin/java/account/update-email.md new file mode 100644 index 0000000000..187fa22e2d --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-email.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.updateEmail( + email = "email@example.com", + password = "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-name.md b/docs/examples/0.9.x/server-kotlin/java/account/update-name.md new file mode 100644 index 0000000000..6f15d10e41 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-name.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.updateName( + name = "[NAME]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-password.md b/docs/examples/0.9.x/server-kotlin/java/account/update-password.md new file mode 100644 index 0000000000..5058503b4c --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-password.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.updatePassword( + password = "password", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-prefs.md b/docs/examples/0.9.x/server-kotlin/java/account/update-prefs.md new file mode 100644 index 0000000000..ca085e904c --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-prefs.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.updatePrefs( + prefs = mapOf( "a" to "b" ) + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-recovery.md b/docs/examples/0.9.x/server-kotlin/java/account/update-recovery.md new file mode 100644 index 0000000000..d2b79d3dc5 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-recovery.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.updateRecovery( + userId = "[USER_ID]", + secret = "[SECRET]", + password = "password", + passwordAgain = "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-verification.md b/docs/examples/0.9.x/server-kotlin/java/account/update-verification.md new file mode 100644 index 0000000000..0c0eb6c962 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-verification.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client 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 + + Account account = new Account(client); + account.updateVerification( + userId = "[USER_ID]", + secret = "[SECRET]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-browser.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-browser.md new file mode 100644 index 0000000000..3042e77002 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-browser.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getBrowser( + code = "aa", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-credit-card.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..956f6b76f3 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-credit-card.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getCreditCard( + code = "amex", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-favicon.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-favicon.md new file mode 100644 index 0000000000..35b64fcc0b --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-favicon.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getFavicon( + url = "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-flag.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-flag.md new file mode 100644 index 0000000000..ccc90df1e6 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-flag.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getFlag( + code = "af", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-image.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-image.md new file mode 100644 index 0000000000..357f6bf29c --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-image.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getImage( + url = "https://example.com", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-initials.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-initials.md new file mode 100644 index 0000000000..c6ef8ce8e7 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-initials.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getInitials( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-q-r.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-q-r.md new file mode 100644 index 0000000000..07031b38ce --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-q-r.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getQR( + text = "[TEXT]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/create-collection.md b/docs/examples/0.9.x/server-kotlin/java/database/create-collection.md new file mode 100644 index 0000000000..e6cce6c375 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/create-collection.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createCollection( + name = "[NAME]", + read = listOf(), + write = listOf(), + rules = listOf() + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/create-document.md b/docs/examples/0.9.x/server-kotlin/java/database/create-document.md new file mode 100644 index 0000000000..5d86b83094 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/create-document.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createDocument( + collectionId = "[COLLECTION_ID]", + data = mapOf( "a" to "b" ), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/delete-collection.md b/docs/examples/0.9.x/server-kotlin/java/database/delete-collection.md new file mode 100644 index 0000000000..ea666ca565 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/delete-collection.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.deleteCollection( + collectionId = "[COLLECTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/delete-document.md b/docs/examples/0.9.x/server-kotlin/java/database/delete-document.md new file mode 100644 index 0000000000..9bc26e85f0 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/delete-document.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.deleteDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/get-collection.md b/docs/examples/0.9.x/server-kotlin/java/database/get-collection.md new file mode 100644 index 0000000000..1d6e96e45d --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/get-collection.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.getCollection( + collectionId = "[COLLECTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/get-document.md b/docs/examples/0.9.x/server-kotlin/java/database/get-document.md new file mode 100644 index 0000000000..4ed6fe7ff9 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/get-document.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.getDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/list-collections.md b/docs/examples/0.9.x/server-kotlin/java/database/list-collections.md new file mode 100644 index 0000000000..9fbda9f9c6 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/list-collections.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.listCollections( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/list-documents.md b/docs/examples/0.9.x/server-kotlin/java/database/list-documents.md new file mode 100644 index 0000000000..05e890783a --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/list-documents.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.listDocuments( + collectionId = "[COLLECTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/update-collection.md b/docs/examples/0.9.x/server-kotlin/java/database/update-collection.md new file mode 100644 index 0000000000..e05700427a --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/update-collection.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.updateCollection( + collectionId = "[COLLECTION_ID]", + name = "[NAME]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/database/update-document.md b/docs/examples/0.9.x/server-kotlin/java/database/update-document.md new file mode 100644 index 0000000000..9c06624d4b --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/database/update-document.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.updateDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", + data = mapOf( "a" to "b" ), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/create-execution.md b/docs/examples/0.9.x/server-kotlin/java/functions/create-execution.md new file mode 100644 index 0000000000..eb13aed5c3 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/create-execution.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.createExecution( + functionId = "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/create-tag.md b/docs/examples/0.9.x/server-kotlin/java/functions/create-tag.md new file mode 100644 index 0000000000..2ab53ae359 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/create-tag.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.createTag( + functionId = "[FUNCTION_ID]", + command = "[COMMAND]", + code = File("./path-to-files/image.jpg") + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/create.md b/docs/examples/0.9.x/server-kotlin/java/functions/create.md new file mode 100644 index 0000000000..2cd762a3b5 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/create.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.create( + name = "[NAME]", + execute = listOf(), + runtime = "java-11.0", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/delete-tag.md b/docs/examples/0.9.x/server-kotlin/java/functions/delete-tag.md new file mode 100644 index 0000000000..35cd36fbdc --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/delete-tag.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.deleteTag( + functionId = "[FUNCTION_ID]", + tagId = "[TAG_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/delete.md b/docs/examples/0.9.x/server-kotlin/java/functions/delete.md new file mode 100644 index 0000000000..a51709b874 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/delete.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.delete( + functionId = "[FUNCTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/get-execution.md b/docs/examples/0.9.x/server-kotlin/java/functions/get-execution.md new file mode 100644 index 0000000000..4161b28eaf --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/get-execution.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.getExecution( + functionId = "[FUNCTION_ID]", + executionId = "[EXECUTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/get-tag.md b/docs/examples/0.9.x/server-kotlin/java/functions/get-tag.md new file mode 100644 index 0000000000..4e805f8386 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/get-tag.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.getTag( + functionId = "[FUNCTION_ID]", + tagId = "[TAG_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/get.md b/docs/examples/0.9.x/server-kotlin/java/functions/get.md new file mode 100644 index 0000000000..8e1cd5ef29 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/get.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.get( + functionId = "[FUNCTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/list-executions.md b/docs/examples/0.9.x/server-kotlin/java/functions/list-executions.md new file mode 100644 index 0000000000..915bf64d4b --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/list-executions.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.listExecutions( + functionId = "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/list-tags.md b/docs/examples/0.9.x/server-kotlin/java/functions/list-tags.md new file mode 100644 index 0000000000..4d67eb99dd --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/list-tags.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.listTags( + functionId = "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/list.md b/docs/examples/0.9.x/server-kotlin/java/functions/list.md new file mode 100644 index 0000000000..e365f30f1f --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/list.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.list( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/update-tag.md b/docs/examples/0.9.x/server-kotlin/java/functions/update-tag.md new file mode 100644 index 0000000000..572e514ec0 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/update-tag.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.updateTag( + functionId = "[FUNCTION_ID]", + tag = "[TAG]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/update.md b/docs/examples/0.9.x/server-kotlin/java/functions/update.md new file mode 100644 index 0000000000..80d95c2f4b --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/functions/update.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.update( + functionId = "[FUNCTION_ID]", + name = "[NAME]", + execute = listOf(), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-anti-virus.md b/docs/examples/0.9.x/server-kotlin/java/health/get-anti-virus.md new file mode 100644 index 0000000000..a27b1c58b9 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-anti-virus.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getAntiVirus(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-cache.md b/docs/examples/0.9.x/server-kotlin/java/health/get-cache.md new file mode 100644 index 0000000000..e7300a34f4 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-cache.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getCache(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-d-b.md b/docs/examples/0.9.x/server-kotlin/java/health/get-d-b.md new file mode 100644 index 0000000000..9644806bd2 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-d-b.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getDB(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-certificates.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-certificates.md new file mode 100644 index 0000000000..084576b65a --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-certificates.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueCertificates(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-functions.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-functions.md new file mode 100644 index 0000000000..9809a03d2f --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-functions.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueFunctions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-logs.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-logs.md new file mode 100644 index 0000000000..4a08fa9321 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-logs.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueLogs(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-tasks.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-tasks.md new file mode 100644 index 0000000000..8e28955770 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-tasks.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueTasks(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-usage.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-usage.md new file mode 100644 index 0000000000..e7fd65f170 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-usage.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueUsage(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-webhooks.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-webhooks.md new file mode 100644 index 0000000000..d8bc27a2bf --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-webhooks.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueWebhooks(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-storage-local.md b/docs/examples/0.9.x/server-kotlin/java/health/get-storage-local.md new file mode 100644 index 0000000000..079eca49e1 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-storage-local.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getStorageLocal(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-time.md b/docs/examples/0.9.x/server-kotlin/java/health/get-time.md new file mode 100644 index 0000000000..a8ca3b91de --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-time.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getTime(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get.md b/docs/examples/0.9.x/server-kotlin/java/health/get.md new file mode 100644 index 0000000000..30adbbbf60 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/health/get.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-continents.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-continents.md new file mode 100644 index 0000000000..836eadac9a --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-continents.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getContinents(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-e-u.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-e-u.md new file mode 100644 index 0000000000..3bb79f9482 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-e-u.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getCountriesEU(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-phones.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-phones.md new file mode 100644 index 0000000000..b1596d2ccb --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-phones.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getCountriesPhones(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-countries.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries.md new file mode 100644 index 0000000000..95d1fef52f --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getCountries(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-currencies.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-currencies.md new file mode 100644 index 0000000000..c7495f485a --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-currencies.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getCurrencies(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-languages.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-languages.md new file mode 100644 index 0000000000..f59054e699 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-languages.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getLanguages(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get.md b/docs/examples/0.9.x/server-kotlin/java/locale/get.md new file mode 100644 index 0000000000..bf2f34fb02 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/create-file.md b/docs/examples/0.9.x/server-kotlin/java/storage/create-file.md new file mode 100644 index 0000000000..2de730aa7b --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/storage/create-file.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.createFile( + file = File("./path-to-files/image.jpg"), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/delete-file.md b/docs/examples/0.9.x/server-kotlin/java/storage/delete-file.md new file mode 100644 index 0000000000..8b9e6438c7 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/storage/delete-file.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.deleteFile( + fileId = "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/get-file-download.md b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-download.md new file mode 100644 index 0000000000..da9fe1c042 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-download.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.getFileDownload( + fileId = "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/get-file-preview.md b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-preview.md new file mode 100644 index 0000000000..928771a5aa --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-preview.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.getFilePreview( + fileId = "[FILE_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/get-file-view.md b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-view.md new file mode 100644 index 0000000000..b74d121c89 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-view.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.getFileView( + fileId = "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/get-file.md b/docs/examples/0.9.x/server-kotlin/java/storage/get-file.md new file mode 100644 index 0000000000..9bf9860976 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/storage/get-file.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.getFile( + fileId = "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/list-files.md b/docs/examples/0.9.x/server-kotlin/java/storage/list-files.md new file mode 100644 index 0000000000..5a85543eae --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/storage/list-files.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.listFiles( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/update-file.md b/docs/examples/0.9.x/server-kotlin/java/storage/update-file.md new file mode 100644 index 0000000000..91fe0168a4 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/storage/update-file.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.updateFile( + fileId = "[FILE_ID]", + read = listOf(), + write = listOf() + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/create-membership.md b/docs/examples/0.9.x/server-kotlin/java/teams/create-membership.md new file mode 100644 index 0000000000..077ce3f058 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/create-membership.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.createMembership( + teamId = "[TEAM_ID]", + email = "email@example.com", + roles = listOf(), + url = "https://example.com", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/create.md b/docs/examples/0.9.x/server-kotlin/java/teams/create.md new file mode 100644 index 0000000000..cdc269fa1a --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/create.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.create( + name = "[NAME]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/delete-membership.md b/docs/examples/0.9.x/server-kotlin/java/teams/delete-membership.md new file mode 100644 index 0000000000..7a57a32d9a --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/delete-membership.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.deleteMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/delete.md b/docs/examples/0.9.x/server-kotlin/java/teams/delete.md new file mode 100644 index 0000000000..7ace480161 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/delete.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.delete( + teamId = "[TEAM_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/get-memberships.md b/docs/examples/0.9.x/server-kotlin/java/teams/get-memberships.md new file mode 100644 index 0000000000..af76419c43 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/get-memberships.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.getMemberships( + teamId = "[TEAM_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/get.md b/docs/examples/0.9.x/server-kotlin/java/teams/get.md new file mode 100644 index 0000000000..23f52dc5c5 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/get.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.get( + teamId = "[TEAM_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/list.md b/docs/examples/0.9.x/server-kotlin/java/teams/list.md new file mode 100644 index 0000000000..2a7bf89f6e --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/list.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.list( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-roles.md b/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-roles.md new file mode 100644 index 0000000000..7e8d68283d --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-roles.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.updateMembershipRoles( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + roles = listOf() + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-status.md b/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-status.md new file mode 100644 index 0000000000..0a528d4d81 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-status.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client 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 + + Teams teams = new Teams(client); + teams.updateMembershipStatus( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + userId = "[USER_ID]", + secret = "[SECRET]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/update.md b/docs/examples/0.9.x/server-kotlin/java/teams/update.md new file mode 100644 index 0000000000..5c05d6a65f --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/teams/update.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.update( + teamId = "[TEAM_ID]", + name = "[NAME]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/create.md b/docs/examples/0.9.x/server-kotlin/java/users/create.md new file mode 100644 index 0000000000..78f815c42f --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/create.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.create( + email = "email@example.com", + password = "password", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/delete-session.md b/docs/examples/0.9.x/server-kotlin/java/users/delete-session.md new file mode 100644 index 0000000000..7295506bc2 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/delete-session.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.deleteSession( + userId = "[USER_ID]", + sessionId = "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/delete-sessions.md b/docs/examples/0.9.x/server-kotlin/java/users/delete-sessions.md new file mode 100644 index 0000000000..6fb4028c37 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/delete-sessions.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.deleteSessions( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/delete.md b/docs/examples/0.9.x/server-kotlin/java/users/delete.md new file mode 100644 index 0000000000..f004170a1e --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/delete.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.delete( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/get-logs.md b/docs/examples/0.9.x/server-kotlin/java/users/get-logs.md new file mode 100644 index 0000000000..44e0ea272a --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/get-logs.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.getLogs( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/get-prefs.md b/docs/examples/0.9.x/server-kotlin/java/users/get-prefs.md new file mode 100644 index 0000000000..d45fbf4682 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/get-prefs.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.getPrefs( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/get-sessions.md b/docs/examples/0.9.x/server-kotlin/java/users/get-sessions.md new file mode 100644 index 0000000000..cf2e06a858 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/get-sessions.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.getSessions( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/get.md b/docs/examples/0.9.x/server-kotlin/java/users/get.md new file mode 100644 index 0000000000..98b3df0680 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/get.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.get( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/list.md b/docs/examples/0.9.x/server-kotlin/java/users/list.md new file mode 100644 index 0000000000..f0c4710b65 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/list.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.list( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/update-prefs.md b/docs/examples/0.9.x/server-kotlin/java/users/update-prefs.md new file mode 100644 index 0000000000..393366cf10 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/update-prefs.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.updatePrefs( + userId = "[USER_ID]", + prefs = mapOf( "a" to "b" ) + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/update-status.md b/docs/examples/0.9.x/server-kotlin/java/users/update-status.md new file mode 100644 index 0000000000..4c802b3bd7 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/update-status.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.updateStatus( + userId = "[USER_ID]", + status = 1 + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/java/users/update-verification.md b/docs/examples/0.9.x/server-kotlin/java/users/update-verification.md new file mode 100644 index 0000000000..cf62364845 --- /dev/null +++ b/docs/examples/0.9.x/server-kotlin/java/users/update-verification.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.updateVerification( + userId = "[USER_ID]", + emailVerification = false + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/create-recovery.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/create-recovery.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/create-recovery.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/create-recovery.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/create-verification.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/create-verification.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/create-verification.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/create-verification.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/delete-session.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/delete-session.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/delete-session.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/delete-session.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/delete-sessions.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/delete-sessions.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/delete-sessions.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/delete-sessions.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/delete.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/delete.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/delete.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/delete.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/get-logs.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/get-logs.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/get-logs.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/get-logs.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/get-prefs.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/get-prefs.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/get-prefs.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/get-prefs.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/get-session.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/get-session.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/get-session.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/get-session.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/get-sessions.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/get-sessions.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/get-sessions.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/get-sessions.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/get.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/get.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/get.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/get.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/update-email.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/update-email.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/update-email.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/update-email.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/update-name.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/update-name.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/update-name.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/update-name.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/update-password.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/update-password.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/update-password.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/update-password.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/update-prefs.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/update-prefs.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/update-prefs.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/update-prefs.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/update-recovery.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/update-recovery.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/update-recovery.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/update-recovery.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/account/update-verification.md b/docs/examples/0.9.x/server-kotlin/kotlin/account/update-verification.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/account/update-verification.md rename to docs/examples/0.9.x/server-kotlin/kotlin/account/update-verification.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-browser.md b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-browser.md similarity index 82% rename from docs/examples/0.9.x/server-kotlin/examples/avatars/get-browser.md rename to docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-browser.md index e0a14cfdf5..d021a952e4 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-browser.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-browser.md @@ -8,8 +8,8 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val avatars = Avatars(client) - val response = avatars.getBrowser( + val result = avatars.getBrowser( code = "aa", ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-credit-card.md b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-credit-card.md similarity index 82% rename from docs/examples/0.9.x/server-kotlin/examples/avatars/get-credit-card.md rename to docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-credit-card.md index b12e8b1241..61592bc3d9 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-credit-card.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-credit-card.md @@ -8,8 +8,8 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val avatars = Avatars(client) - val response = avatars.getCreditCard( + val result = avatars.getCreditCard( code = "amex", ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-favicon.md b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-favicon.md similarity index 83% rename from docs/examples/0.9.x/server-kotlin/examples/avatars/get-favicon.md rename to docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-favicon.md index 0fd68bc69f..3714ac210a 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-favicon.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-favicon.md @@ -8,8 +8,8 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val avatars = Avatars(client) - val response = avatars.getFavicon( + val result = avatars.getFavicon( url = "https://example.com" ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-flag.md b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-flag.md similarity index 83% rename from docs/examples/0.9.x/server-kotlin/examples/avatars/get-flag.md rename to docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-flag.md index 0ca7e995d9..0efd3c9974 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-flag.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-flag.md @@ -8,8 +8,8 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val avatars = Avatars(client) - val response = avatars.getFlag( + val result = avatars.getFlag( code = "af", ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-image.md b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-image.md similarity index 83% rename from docs/examples/0.9.x/server-kotlin/examples/avatars/get-image.md rename to docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-image.md index 21bb003b2d..0d3f855617 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-image.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-image.md @@ -8,8 +8,8 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val avatars = Avatars(client) - val response = avatars.getImage( + val result = avatars.getImage( url = "https://example.com", ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-initials.md b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-initials.md similarity index 81% rename from docs/examples/0.9.x/server-kotlin/examples/avatars/get-initials.md rename to docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-initials.md index 09913071d3..de5a30c5c1 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-initials.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-initials.md @@ -8,7 +8,7 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val avatars = Avatars(client) - val response = avatars.getInitials( + val result = avatars.getInitials( ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-q-r.md b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-q-r.md similarity index 83% rename from docs/examples/0.9.x/server-kotlin/examples/avatars/get-q-r.md rename to docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-q-r.md index c9ae1810a5..008922575d 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/avatars/get-q-r.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/avatars/get-q-r.md @@ -8,8 +8,8 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val avatars = Avatars(client) - val response = avatars.getQR( + val result = avatars.getQR( text = "[TEXT]", ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/create-collection.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/create-collection.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/create-collection.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/create-collection.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/create-document.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/create-document.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/create-document.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/create-document.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/delete-collection.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/delete-collection.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/delete-collection.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/delete-collection.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/delete-document.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/delete-document.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/delete-document.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/delete-document.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/get-collection.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/get-collection.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/get-collection.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/get-collection.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/get-document.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/get-document.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/get-document.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/get-document.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/list-collections.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/list-collections.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/list-collections.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/list-collections.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/list-documents.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/list-documents.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/list-documents.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/list-documents.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/update-collection.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/update-collection.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/update-collection.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/update-collection.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/database/update-document.md b/docs/examples/0.9.x/server-kotlin/kotlin/database/update-document.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/database/update-document.md rename to docs/examples/0.9.x/server-kotlin/kotlin/database/update-document.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/create-execution.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/create-execution.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/create-execution.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/create-execution.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/create-tag.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/create-tag.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/create-tag.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/create-tag.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/create.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/create.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/create.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/create.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/delete-tag.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/delete-tag.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/delete-tag.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/delete-tag.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/delete.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/delete.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/delete.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/delete.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/get-execution.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/get-execution.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/get-execution.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/get-execution.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/get-tag.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/get-tag.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/get-tag.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/get-tag.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/get.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/get.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/get.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/get.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/list-executions.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/list-executions.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/list-executions.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/list-executions.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/list-tags.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/list-tags.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/list-tags.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/list-tags.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/list.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/list.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/list.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/list.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/update-tag.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/update-tag.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/update-tag.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/update-tag.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/functions/update.md b/docs/examples/0.9.x/server-kotlin/kotlin/functions/update.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/functions/update.md rename to docs/examples/0.9.x/server-kotlin/kotlin/functions/update.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-anti-virus.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-anti-virus.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-anti-virus.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-anti-virus.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-cache.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-cache.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-cache.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-cache.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-d-b.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-d-b.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-d-b.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-d-b.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-queue-certificates.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-certificates.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-queue-certificates.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-certificates.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-queue-functions.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-functions.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-queue-functions.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-functions.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-queue-logs.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-logs.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-queue-logs.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-logs.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-queue-tasks.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-tasks.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-queue-tasks.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-tasks.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-queue-usage.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-usage.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-queue-usage.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-usage.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-queue-webhooks.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-webhooks.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-queue-webhooks.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-queue-webhooks.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-storage-local.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-storage-local.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-storage-local.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-storage-local.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get-time.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get-time.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get-time.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get-time.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/health/get.md b/docs/examples/0.9.x/server-kotlin/kotlin/health/get.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/health/get.md rename to docs/examples/0.9.x/server-kotlin/kotlin/health/get.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/locale/get-continents.md b/docs/examples/0.9.x/server-kotlin/kotlin/locale/get-continents.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/locale/get-continents.md rename to docs/examples/0.9.x/server-kotlin/kotlin/locale/get-continents.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/locale/get-countries-e-u.md b/docs/examples/0.9.x/server-kotlin/kotlin/locale/get-countries-e-u.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/locale/get-countries-e-u.md rename to docs/examples/0.9.x/server-kotlin/kotlin/locale/get-countries-e-u.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/locale/get-countries-phones.md b/docs/examples/0.9.x/server-kotlin/kotlin/locale/get-countries-phones.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/locale/get-countries-phones.md rename to docs/examples/0.9.x/server-kotlin/kotlin/locale/get-countries-phones.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/locale/get-countries.md b/docs/examples/0.9.x/server-kotlin/kotlin/locale/get-countries.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/locale/get-countries.md rename to docs/examples/0.9.x/server-kotlin/kotlin/locale/get-countries.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/locale/get-currencies.md b/docs/examples/0.9.x/server-kotlin/kotlin/locale/get-currencies.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/locale/get-currencies.md rename to docs/examples/0.9.x/server-kotlin/kotlin/locale/get-currencies.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/locale/get-languages.md b/docs/examples/0.9.x/server-kotlin/kotlin/locale/get-languages.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/locale/get-languages.md rename to docs/examples/0.9.x/server-kotlin/kotlin/locale/get-languages.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/locale/get.md b/docs/examples/0.9.x/server-kotlin/kotlin/locale/get.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/locale/get.md rename to docs/examples/0.9.x/server-kotlin/kotlin/locale/get.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/storage/create-file.md b/docs/examples/0.9.x/server-kotlin/kotlin/storage/create-file.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/storage/create-file.md rename to docs/examples/0.9.x/server-kotlin/kotlin/storage/create-file.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/storage/delete-file.md b/docs/examples/0.9.x/server-kotlin/kotlin/storage/delete-file.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/storage/delete-file.md rename to docs/examples/0.9.x/server-kotlin/kotlin/storage/delete-file.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/storage/get-file-download.md b/docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file-download.md similarity index 82% rename from docs/examples/0.9.x/server-kotlin/examples/storage/get-file-download.md rename to docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file-download.md index cdae077560..7a2867ce97 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/storage/get-file-download.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file-download.md @@ -8,8 +8,8 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val storage = Storage(client) - val response = storage.getFileDownload( + val result = storage.getFileDownload( fileId = "[FILE_ID]" ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/storage/get-file-preview.md b/docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file-preview.md similarity index 82% rename from docs/examples/0.9.x/server-kotlin/examples/storage/get-file-preview.md rename to docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file-preview.md index ced1a9e067..08c0c61cd3 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/storage/get-file-preview.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file-preview.md @@ -8,8 +8,8 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val storage = Storage(client) - val response = storage.getFilePreview( + val result = storage.getFilePreview( fileId = "[FILE_ID]", ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/storage/get-file-view.md b/docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file-view.md similarity index 83% rename from docs/examples/0.9.x/server-kotlin/examples/storage/get-file-view.md rename to docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file-view.md index a56111fa3f..b9120d8ffc 100644 --- a/docs/examples/0.9.x/server-kotlin/examples/storage/get-file-view.md +++ b/docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file-view.md @@ -8,8 +8,8 @@ suspend fun main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val storage = Storage(client) - val response = storage.getFileView( + val result = storage.getFileView( fileId = "[FILE_ID]" ) - val json = response.body?.string() + println(result); // Resource URL } \ No newline at end of file diff --git a/docs/examples/0.9.x/server-kotlin/examples/storage/get-file.md b/docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/storage/get-file.md rename to docs/examples/0.9.x/server-kotlin/kotlin/storage/get-file.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/storage/list-files.md b/docs/examples/0.9.x/server-kotlin/kotlin/storage/list-files.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/storage/list-files.md rename to docs/examples/0.9.x/server-kotlin/kotlin/storage/list-files.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/storage/update-file.md b/docs/examples/0.9.x/server-kotlin/kotlin/storage/update-file.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/storage/update-file.md rename to docs/examples/0.9.x/server-kotlin/kotlin/storage/update-file.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/create-membership.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/create-membership.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/create-membership.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/create-membership.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/create.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/create.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/create.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/create.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/delete-membership.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/delete-membership.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/delete-membership.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/delete-membership.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/delete.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/delete.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/delete.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/delete.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/get-memberships.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/get-memberships.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/get-memberships.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/get-memberships.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/get.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/get.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/get.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/get.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/list.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/list.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/list.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/list.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/update-membership-roles.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/update-membership-roles.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/update-membership-roles.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/update-membership-roles.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/update-membership-status.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/update-membership-status.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/update-membership-status.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/update-membership-status.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/teams/update.md b/docs/examples/0.9.x/server-kotlin/kotlin/teams/update.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/teams/update.md rename to docs/examples/0.9.x/server-kotlin/kotlin/teams/update.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/create.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/create.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/create.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/create.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/delete-session.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/delete-session.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/delete-session.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/delete-session.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/delete-sessions.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/delete-sessions.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/delete-sessions.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/delete-sessions.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/delete.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/delete.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/delete.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/delete.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/get-logs.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/get-logs.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/get-logs.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/get-logs.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/get-prefs.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/get-prefs.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/get-prefs.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/get-prefs.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/get-sessions.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/get-sessions.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/get-sessions.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/get-sessions.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/get.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/get.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/get.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/get.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/list.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/list.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/list.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/list.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/update-prefs.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/update-prefs.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/update-prefs.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/update-prefs.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/update-status.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/update-status.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/update-status.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/update-status.md diff --git a/docs/examples/0.9.x/server-kotlin/examples/users/update-verification.md b/docs/examples/0.9.x/server-kotlin/kotlin/users/update-verification.md similarity index 100% rename from docs/examples/0.9.x/server-kotlin/examples/users/update-verification.md rename to docs/examples/0.9.x/server-kotlin/kotlin/users/update-verification.md