chore: generate specs and examples

This commit is contained in:
Chirag Aggarwal
2025-04-30 08:14:48 +00:00
parent bd50baff85
commit e3e0fed7ba
5465 changed files with 89635 additions and 2278 deletions
+148 -42
View File
@@ -18,6 +18,9 @@
"servers": [
{
"url": "https:\/\/cloud.appwrite.io\/v1"
},
{
"url": "https:\/\/<REGION>.cloud.appwrite.io\/v1"
}
],
"paths": {
@@ -43,6 +46,7 @@
},
"x-appwrite": {
"method": "get",
"group": "account",
"weight": 10,
"cookies": false,
"type": "",
@@ -91,6 +95,7 @@
},
"x-appwrite": {
"method": "create",
"group": "account",
"weight": 9,
"cookies": false,
"type": "",
@@ -175,6 +180,7 @@
},
"x-appwrite": {
"method": "updateEmail",
"group": "account",
"weight": 35,
"cookies": false,
"type": "",
@@ -250,6 +256,7 @@
},
"x-appwrite": {
"method": "listIdentities",
"group": "identities",
"weight": 58,
"cookies": false,
"type": "",
@@ -308,6 +315,7 @@
},
"x-appwrite": {
"method": "deleteIdentity",
"group": "identities",
"weight": 59,
"cookies": false,
"type": "",
@@ -370,6 +378,7 @@
},
"x-appwrite": {
"method": "createJWT",
"group": "tokens",
"weight": 30,
"cookies": false,
"type": "",
@@ -418,6 +427,7 @@
},
"x-appwrite": {
"method": "listLogs",
"group": "logs",
"weight": 32,
"cookies": false,
"type": "",
@@ -483,6 +493,7 @@
},
"x-appwrite": {
"method": "updateMFA",
"group": "mfa",
"weight": 45,
"cookies": false,
"type": "",
@@ -552,6 +563,7 @@
},
"x-appwrite": {
"method": "createMfaAuthenticator",
"group": "mfa",
"weight": 47,
"cookies": false,
"type": "",
@@ -597,7 +609,7 @@
]
},
"put": {
"summary": "Verify authenticator",
"summary": "Update authenticator (confirmation)",
"operationId": "accountUpdateMfaAuthenticator",
"tags": [
"account"
@@ -617,6 +629,7 @@
},
"x-appwrite": {
"method": "updateMfaAuthenticator",
"group": "mfa",
"weight": 48,
"cookies": false,
"type": "",
@@ -694,6 +707,7 @@
},
"x-appwrite": {
"method": "deleteMfaAuthenticator",
"group": "mfa",
"weight": 52,
"cookies": false,
"type": "",
@@ -761,6 +775,7 @@
},
"x-appwrite": {
"method": "createMfaChallenge",
"group": "mfa",
"weight": 53,
"cookies": false,
"type": "",
@@ -814,7 +829,7 @@
}
},
"put": {
"summary": "Create MFA challenge (confirmation)",
"summary": "Update MFA challenge (confirmation)",
"operationId": "accountUpdateMfaChallenge",
"tags": [
"account"
@@ -834,6 +849,7 @@
},
"x-appwrite": {
"method": "updateMfaChallenge",
"group": "mfa",
"weight": 54,
"cookies": false,
"type": "",
@@ -909,6 +925,7 @@
},
"x-appwrite": {
"method": "listMfaFactors",
"group": "mfa",
"weight": 46,
"cookies": false,
"type": "",
@@ -939,7 +956,7 @@
},
"\/account\/mfa\/recovery-codes": {
"get": {
"summary": "Get MFA recovery codes",
"summary": "List MFA recovery codes",
"operationId": "accountGetMfaRecoveryCodes",
"tags": [
"account"
@@ -959,6 +976,7 @@
},
"x-appwrite": {
"method": "getMfaRecoveryCodes",
"group": "mfa",
"weight": 51,
"cookies": false,
"type": "",
@@ -1007,6 +1025,7 @@
},
"x-appwrite": {
"method": "createMfaRecoveryCodes",
"group": "mfa",
"weight": 49,
"cookies": false,
"type": "",
@@ -1035,7 +1054,7 @@
]
},
"patch": {
"summary": "Regenerate MFA recovery codes",
"summary": "Update MFA recovery codes (regenerate)",
"operationId": "accountUpdateMfaRecoveryCodes",
"tags": [
"account"
@@ -1055,6 +1074,7 @@
},
"x-appwrite": {
"method": "updateMfaRecoveryCodes",
"group": "mfa",
"weight": 50,
"cookies": false,
"type": "",
@@ -1105,6 +1125,7 @@
},
"x-appwrite": {
"method": "updateName",
"group": "account",
"weight": 33,
"cookies": false,
"type": "",
@@ -1174,6 +1195,7 @@
},
"x-appwrite": {
"method": "updatePassword",
"group": "account",
"weight": 34,
"cookies": false,
"type": "",
@@ -1248,6 +1270,7 @@
},
"x-appwrite": {
"method": "updatePhone",
"group": "account",
"weight": 36,
"cookies": false,
"type": "",
@@ -1323,6 +1346,7 @@
},
"x-appwrite": {
"method": "getPrefs",
"group": "account",
"weight": 31,
"cookies": false,
"type": "",
@@ -1371,6 +1395,7 @@
},
"x-appwrite": {
"method": "updatePrefs",
"group": "account",
"weight": 37,
"cookies": false,
"type": "",
@@ -1440,6 +1465,7 @@
},
"x-appwrite": {
"method": "createRecovery",
"group": "recovery",
"weight": 39,
"cookies": false,
"type": "",
@@ -1496,7 +1522,7 @@
}
},
"put": {
"summary": "Create password recovery (confirmation)",
"summary": "Update password recovery (confirmation)",
"operationId": "accountUpdateRecovery",
"tags": [
"account"
@@ -1516,6 +1542,7 @@
},
"x-appwrite": {
"method": "updateRecovery",
"group": "recovery",
"weight": 40,
"cookies": false,
"type": "",
@@ -1597,6 +1624,7 @@
},
"x-appwrite": {
"method": "listSessions",
"group": "sessions",
"weight": 12,
"cookies": false,
"type": "",
@@ -1638,6 +1666,7 @@
},
"x-appwrite": {
"method": "deleteSessions",
"group": "sessions",
"weight": 13,
"cookies": false,
"type": "",
@@ -1688,6 +1717,7 @@
},
"x-appwrite": {
"method": "createAnonymousSession",
"group": "sessions",
"weight": 18,
"cookies": false,
"type": "",
@@ -1736,6 +1766,7 @@
},
"x-appwrite": {
"method": "createEmailPasswordSession",
"group": "sessions",
"weight": 17,
"cookies": false,
"type": "",
@@ -1809,6 +1840,7 @@
},
"x-appwrite": {
"method": "updateMagicURLSession",
"group": "sessions",
"weight": 27,
"cookies": false,
"type": "",
@@ -1875,6 +1907,7 @@
},
"x-appwrite": {
"method": "createOAuth2Session",
"group": "sessions",
"weight": 20,
"cookies": false,
"type": "webAuth",
@@ -1902,7 +1935,7 @@
"parameters": [
{
"name": "provider",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.",
"required": true,
"schema": {
"type": "string",
@@ -1922,6 +1955,7 @@
"dropbox",
"etsy",
"facebook",
"figma",
"github",
"gitlab",
"google",
@@ -2015,6 +2049,7 @@
},
"x-appwrite": {
"method": "updatePhoneSession",
"group": "sessions",
"weight": 28,
"cookies": false,
"type": "",
@@ -2088,6 +2123,7 @@
},
"x-appwrite": {
"method": "createSession",
"group": "sessions",
"weight": 19,
"cookies": false,
"type": "",
@@ -2161,6 +2197,7 @@
},
"x-appwrite": {
"method": "getSession",
"group": "sessions",
"weight": 14,
"cookies": false,
"type": "",
@@ -2221,6 +2258,7 @@
},
"x-appwrite": {
"method": "updateSession",
"group": "sessions",
"weight": 16,
"cookies": false,
"type": "",
@@ -2274,6 +2312,7 @@
},
"x-appwrite": {
"method": "deleteSession",
"group": "sessions",
"weight": 15,
"cookies": false,
"type": "",
@@ -2336,6 +2375,7 @@
},
"x-appwrite": {
"method": "updateStatus",
"group": "account",
"weight": 38,
"cookies": false,
"type": "",
@@ -2386,6 +2426,7 @@
},
"x-appwrite": {
"method": "createPushTarget",
"group": "pushTargets",
"weight": 55,
"cookies": false,
"type": "",
@@ -2464,6 +2505,7 @@
},
"x-appwrite": {
"method": "updatePushTarget",
"group": "pushTargets",
"weight": 56,
"cookies": false,
"type": "",
@@ -2534,6 +2576,7 @@
},
"x-appwrite": {
"method": "deletePushTarget",
"group": "pushTargets",
"weight": 57,
"cookies": false,
"type": "",
@@ -2594,6 +2637,7 @@
},
"x-appwrite": {
"method": "createEmailToken",
"group": "tokens",
"weight": 26,
"cookies": false,
"type": "",
@@ -2672,6 +2716,7 @@
},
"x-appwrite": {
"method": "createMagicURLToken",
"group": "tokens",
"weight": 25,
"cookies": false,
"type": "",
@@ -2751,6 +2796,7 @@
},
"x-appwrite": {
"method": "createOAuth2Token",
"group": "tokens",
"weight": 24,
"cookies": false,
"type": "webAuth",
@@ -2778,7 +2824,7 @@
"parameters": [
{
"name": "provider",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.",
"required": true,
"schema": {
"type": "string",
@@ -2798,6 +2844,7 @@
"dropbox",
"etsy",
"facebook",
"figma",
"github",
"gitlab",
"google",
@@ -2891,6 +2938,7 @@
},
"x-appwrite": {
"method": "createPhoneToken",
"group": "tokens",
"weight": 29,
"cookies": false,
"type": "",
@@ -2967,6 +3015,7 @@
},
"x-appwrite": {
"method": "createVerification",
"group": "verification",
"weight": 41,
"cookies": false,
"type": "",
@@ -3014,7 +3063,7 @@
}
},
"put": {
"summary": "Create email verification (confirmation)",
"summary": "Update email verification (confirmation)",
"operationId": "accountUpdateVerification",
"tags": [
"account"
@@ -3034,6 +3083,7 @@
},
"x-appwrite": {
"method": "updateVerification",
"group": "verification",
"weight": 42,
"cookies": false,
"type": "",
@@ -3109,6 +3159,7 @@
},
"x-appwrite": {
"method": "createPhoneVerification",
"group": "verification",
"weight": 43,
"cookies": false,
"type": "",
@@ -3160,6 +3211,7 @@
},
"x-appwrite": {
"method": "updatePhoneVerification",
"group": "verification",
"weight": 44,
"cookies": false,
"type": "",
@@ -3228,6 +3280,7 @@
},
"x-appwrite": {
"method": "getBrowser",
"group": null,
"weight": 61,
"cookies": false,
"type": "location",
@@ -3353,6 +3406,7 @@
},
"x-appwrite": {
"method": "getCreditCard",
"group": null,
"weight": 60,
"cookies": false,
"type": "location",
@@ -3484,6 +3538,7 @@
},
"x-appwrite": {
"method": "getFavicon",
"group": null,
"weight": 64,
"cookies": false,
"type": "location",
@@ -3541,6 +3596,7 @@
},
"x-appwrite": {
"method": "getFlag",
"group": null,
"weight": 62,
"cookies": false,
"type": "location",
@@ -4028,6 +4084,7 @@
},
"x-appwrite": {
"method": "getImage",
"group": null,
"weight": 63,
"cookies": false,
"type": "location",
@@ -4109,6 +4166,7 @@
},
"x-appwrite": {
"method": "getInitials",
"group": null,
"weight": 66,
"cookies": false,
"type": "location",
@@ -4200,6 +4258,7 @@
},
"x-appwrite": {
"method": "getQR",
"group": null,
"weight": 65,
"cookies": false,
"type": "location",
@@ -4298,6 +4357,7 @@
},
"x-appwrite": {
"method": "listDocuments",
"group": "documents",
"weight": 110,
"cookies": false,
"type": "",
@@ -4382,6 +4442,7 @@
},
"x-appwrite": {
"method": "createDocument",
"group": "documents",
"weight": 109,
"cookies": false,
"type": "",
@@ -4488,6 +4549,7 @@
},
"x-appwrite": {
"method": "getDocument",
"group": "documents",
"weight": 111,
"cookies": false,
"type": "",
@@ -4582,6 +4644,7 @@
},
"x-appwrite": {
"method": "updateDocument",
"group": "documents",
"weight": 113,
"cookies": false,
"type": "",
@@ -4680,6 +4743,7 @@
},
"x-appwrite": {
"method": "deleteDocument",
"group": "documents",
"weight": 114,
"cookies": false,
"type": "",
@@ -4763,7 +4827,8 @@
},
"x-appwrite": {
"method": "listExecutions",
"weight": 384,
"group": "executions",
"weight": 388,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4837,7 +4902,8 @@
},
"x-appwrite": {
"method": "createExecution",
"weight": 382,
"group": "executions",
"weight": 386,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4951,7 +5017,8 @@
},
"x-appwrite": {
"method": "getExecution",
"weight": 383,
"group": "executions",
"weight": 387,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5024,7 +5091,8 @@
},
"x-appwrite": {
"method": "query",
"weight": 303,
"group": "graphql",
"weight": 302,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5075,7 +5143,8 @@
},
"x-appwrite": {
"method": "mutation",
"weight": 302,
"group": "graphql",
"weight": 301,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5126,6 +5195,7 @@
},
"x-appwrite": {
"method": "get",
"group": null,
"weight": 118,
"cookies": false,
"type": "",
@@ -5177,6 +5247,7 @@
},
"x-appwrite": {
"method": "listCodes",
"group": null,
"weight": 119,
"cookies": false,
"type": "",
@@ -5228,6 +5299,7 @@
},
"x-appwrite": {
"method": "listContinents",
"group": null,
"weight": 123,
"cookies": false,
"type": "",
@@ -5279,6 +5351,7 @@
},
"x-appwrite": {
"method": "listCountries",
"group": null,
"weight": 120,
"cookies": false,
"type": "",
@@ -5330,6 +5403,7 @@
},
"x-appwrite": {
"method": "listCountriesEU",
"group": null,
"weight": 121,
"cookies": false,
"type": "",
@@ -5381,6 +5455,7 @@
},
"x-appwrite": {
"method": "listCountriesPhones",
"group": null,
"weight": 122,
"cookies": false,
"type": "",
@@ -5432,6 +5507,7 @@
},
"x-appwrite": {
"method": "listCurrencies",
"group": null,
"weight": 124,
"cookies": false,
"type": "",
@@ -5483,6 +5559,7 @@
},
"x-appwrite": {
"method": "listLanguages",
"group": null,
"weight": 125,
"cookies": false,
"type": "",
@@ -5534,7 +5611,8 @@
},
"x-appwrite": {
"method": "createSubscriber",
"weight": 349,
"group": "subscribers",
"weight": 348,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5616,7 +5694,8 @@
},
"x-appwrite": {
"method": "deleteSubscriber",
"weight": 353,
"group": "subscribers",
"weight": 352,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5690,7 +5769,8 @@
},
"x-appwrite": {
"method": "listFiles",
"weight": 209,
"group": "files",
"weight": 208,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5775,7 +5855,8 @@
},
"x-appwrite": {
"method": "createFile",
"weight": 208,
"group": "files",
"weight": 207,
"cookies": false,
"type": "upload",
"deprecated": false,
@@ -5872,7 +5953,8 @@
},
"x-appwrite": {
"method": "getFile",
"weight": 210,
"group": "files",
"weight": 209,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5943,7 +6025,8 @@
},
"x-appwrite": {
"method": "updateFile",
"weight": 215,
"group": "files",
"weight": 214,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6031,7 +6114,8 @@
},
"x-appwrite": {
"method": "deleteFile",
"weight": 216,
"group": "files",
"weight": 215,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6097,7 +6181,8 @@
},
"x-appwrite": {
"method": "getFileDownload",
"weight": 212,
"group": "files",
"weight": 211,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6163,7 +6248,8 @@
},
"x-appwrite": {
"method": "getFilePreview",
"weight": 211,
"group": "files",
"weight": 210,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6379,7 +6465,8 @@
},
"x-appwrite": {
"method": "getFileView",
"weight": 213,
"group": "files",
"weight": 212,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6452,7 +6539,8 @@
},
"x-appwrite": {
"method": "list",
"weight": 220,
"group": "teams",
"weight": 219,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6527,7 +6615,8 @@
},
"x-appwrite": {
"method": "create",
"weight": 219,
"group": "teams",
"weight": 218,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6611,7 +6700,8 @@
},
"x-appwrite": {
"method": "get",
"weight": 221,
"group": "teams",
"weight": 220,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6672,7 +6762,8 @@
},
"x-appwrite": {
"method": "updateName",
"weight": 223,
"group": "teams",
"weight": 222,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6745,7 +6836,8 @@
},
"x-appwrite": {
"method": "delete",
"weight": 225,
"group": "teams",
"weight": 224,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6808,7 +6900,8 @@
},
"x-appwrite": {
"method": "listMemberships",
"weight": 227,
"group": "memberships",
"weight": 226,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6893,7 +6986,8 @@
},
"x-appwrite": {
"method": "createMembership",
"weight": 226,
"group": "memberships",
"weight": 225,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7003,7 +7097,8 @@
},
"x-appwrite": {
"method": "getMembership",
"weight": 228,
"group": "memberships",
"weight": 227,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7074,7 +7169,8 @@
},
"x-appwrite": {
"method": "updateMembership",
"weight": 229,
"group": "memberships",
"weight": 228,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7160,7 +7256,8 @@
},
"x-appwrite": {
"method": "deleteMembership",
"weight": 231,
"group": "memberships",
"weight": 230,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7233,7 +7330,8 @@
},
"x-appwrite": {
"method": "updateMembershipStatus",
"weight": 230,
"group": "memberships",
"weight": 229,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7330,7 +7428,8 @@
},
"x-appwrite": {
"method": "getPrefs",
"weight": 222,
"group": "teams",
"weight": 221,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7390,7 +7489,8 @@
},
"x-appwrite": {
"method": "updatePrefs",
"weight": 224,
"group": "teams",
"weight": 223,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7471,7 +7571,8 @@
},
"x-appwrite": {
"method": "list",
"weight": 432,
"group": "files",
"weight": 436,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7552,7 +7653,8 @@
},
"x-appwrite": {
"method": "createFileToken",
"weight": 429,
"group": "files",
"weight": 433,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7650,7 +7752,8 @@
},
"x-appwrite": {
"method": "get",
"weight": 430,
"group": "tokens",
"weight": 434,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7711,7 +7814,8 @@
},
"x-appwrite": {
"method": "update",
"weight": 433,
"group": "tokens",
"weight": 437,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7790,7 +7894,8 @@
},
"x-appwrite": {
"method": "delete",
"weight": 434,
"group": "tokens",
"weight": 438,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7853,7 +7958,8 @@
},
"x-appwrite": {
"method": "getJWT",
"weight": 431,
"group": "tokens",
"weight": 435,
"cookies": false,
"type": "",
"deprecated": false,
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createAnonymousSession(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createEmailPasswordSession(
"email@example.com", // email
"password", // password
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createEmailToken(
"<USER_ID>", // userId
"email@example.com", // email
false, // phrase (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createJWT(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,25 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createMagicURLToken(
"<USER_ID>", // userId
"email@example.com", // email
"https://example.com", // url (optional)
false, // phrase (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticatorType;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createMfaAuthenticator(
AuthenticatorType.TOTP, // type
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticationFactor;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createMfaChallenge(
AuthenticationFactor.EMAIL, // factor
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.OAuthProvider;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createOAuth2Session(
OAuthProvider.AMAZON, // provider
"https://example.com", // success (optional)
"https://example.com", // failure (optional)
listOf(), // scopes (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.OAuthProvider;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createOAuth2Token(
OAuthProvider.AMAZON, // provider
"https://example.com", // success (optional)
"https://example.com", // failure (optional)
listOf(), // scopes (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createPhoneToken(
"<USER_ID>", // userId
"+12065550100", // phone
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createPhoneVerification(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createPushTarget(
"<TARGET_ID>", // targetId
"<IDENTIFIER>", // identifier
"<PROVIDER_ID>", // providerId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createRecovery(
"email@example.com", // email
"https://example.com", // url
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createSession(
"<USER_ID>", // userId
"<SECRET>", // secret
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createVerification(
"https://example.com", // url
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,25 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.create(
"<USER_ID>", // userId
"email@example.com", // email
"", // password
"<NAME>", // name (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.deleteIdentity(
"<IDENTITY_ID>", // identityId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticatorType;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.deleteMfaAuthenticator(
AuthenticatorType.TOTP, // type
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.deletePushTarget(
"<TARGET_ID>", // targetId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.deleteSession(
"<SESSION_ID>", // sessionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.deleteSessions(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.getPrefs(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.getSession(
"<SESSION_ID>", // sessionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.get(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.listIdentities(
listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.listLogs(
listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.listMfaFactors(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.listSessions(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateEmail(
"email@example.com", // email
"password", // password
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateMFA(
false, // mfa
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateMagicURLSession(
"<USER_ID>", // userId
"<SECRET>", // secret
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticatorType;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateMfaAuthenticator(
AuthenticatorType.TOTP, // type
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateMfaChallenge(
"<CHALLENGE_ID>", // challengeId
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateName(
"<NAME>", // name
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updatePassword(
"", // password
"password", // oldPassword (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updatePhoneSession(
"<USER_ID>", // userId
"<SECRET>", // secret
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updatePhoneVerification(
"<USER_ID>", // userId
"<SECRET>", // secret
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updatePhone(
"+12065550100", // phone
"password", // password
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updatePrefs(
mapOf( "a" to "b" ), // prefs
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updatePushTarget(
"<TARGET_ID>", // targetId
"<IDENTIFIER>", // identifier
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateRecovery(
"<USER_ID>", // userId
"<SECRET>", // secret
"", // password
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateSession(
"<SESSION_ID>", // sessionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateStatus(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateVerification(
"<USER_ID>", // userId
"<SECRET>", // secret
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
import io.appwrite.enums.Browser;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getBrowser(
Browser.AVANT_BROWSER, // code
0, // width (optional)
0, // height (optional)
0, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
import io.appwrite.enums.CreditCard;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getCreditCard(
CreditCard.AMERICAN_EXPRESS, // code
0, // width (optional)
0, // height (optional)
0, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getFavicon(
"https://example.com", // url
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
import io.appwrite.enums.Flag;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getFlag(
Flag.AFGHANISTAN, // code
0, // width (optional)
0, // height (optional)
0, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getImage(
"https://example.com", // url
0, // width (optional)
0, // height (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,25 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getInitials(
"<NAME>", // name (optional)
0, // width (optional)
0, // height (optional)
"", // background (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,25 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getQR(
"<TEXT>", // text
1, // size (optional)
0, // margin (optional)
false, // download (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Databases databases = new Databases(client);
databases.createDocument(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
mapOf( "a" to "b" ), // data
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Databases databases = new Databases(client);
databases.deleteDocument(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,25 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Databases databases = new Databases(client);
databases.getDocument(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Databases databases = new Databases(client);
databases.listDocuments(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Databases databases = new Databases(client);
databases.updateDocument(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
mapOf( "a" to "b" ), // data (optional)
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,28 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.createExecution(
"<FUNCTION_ID>", // functionId
"<BODY>", // body (optional)
false, // async (optional)
"<PATH>", // path (optional)
ExecutionMethod.GET, // method (optional)
mapOf( "a" to "b" ), // headers (optional)
"", // scheduledAt (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.getExecution(
"<FUNCTION_ID>", // functionId
"<EXECUTION_ID>", // executionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.listExecutions(
"<FUNCTION_ID>", // functionId
listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Graphql;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Graphql graphql = new Graphql(client);
graphql.mutation(
mapOf( "a" to "b" ), // query
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Graphql;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Graphql graphql = new Graphql(client);
graphql.query(
mapOf( "a" to "b" ), // query
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Locale;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Locale locale = new Locale(client);
locale.get(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Locale;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Locale locale = new Locale(client);
locale.listCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Locale;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Locale locale = new Locale(client);
locale.listContinents(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Locale;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Locale locale = new Locale(client);
locale.listCountriesEU(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Locale;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Locale locale = new Locale(client);
locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Locale;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Locale locale = new Locale(client);
locale.listCountries(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Locale;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Locale locale = new Locale(client);
locale.listCurrencies(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Locale;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Locale locale = new Locale(client);
locale.listLanguages(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Messaging;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Messaging messaging = new Messaging(client);
messaging.createSubscriber(
"<TOPIC_ID>", // topicId
"<SUBSCRIBER_ID>", // subscriberId
"<TARGET_ID>", // targetId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Messaging;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Messaging messaging = new Messaging(client);
messaging.deleteSubscriber(
"<TOPIC_ID>", // topicId
"<SUBSCRIBER_ID>", // subscriberId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.models.InputFile;
import io.appwrite.services.Storage;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Storage storage = new Storage(client);
storage.createFile(
"<BUCKET_ID>", // bucketId
"<FILE_ID>", // fileId
InputFile.fromPath("file.png"), // file
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Storage;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Storage storage = new Storage(client);
storage.deleteFile(
"<BUCKET_ID>", // bucketId
"<FILE_ID>", // fileId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Storage;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Storage storage = new Storage(client);
storage.getFileDownload(
"<BUCKET_ID>", // bucketId
"<FILE_ID>", // fileId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,34 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Storage;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Storage storage = new Storage(client);
storage.getFilePreview(
"<BUCKET_ID>", // bucketId
"<FILE_ID>", // fileId
0, // width (optional)
0, // height (optional)
ImageGravity.CENTER, // gravity (optional)
0, // quality (optional)
0, // borderWidth (optional)
"", // borderColor (optional)
0, // borderRadius (optional)
0, // opacity (optional)
-360, // rotation (optional)
"", // background (optional)
ImageFormat.JPG, // output (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Storage;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Storage storage = new Storage(client);
storage.getFileView(
"<BUCKET_ID>", // bucketId
"<FILE_ID>", // fileId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Storage;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Storage storage = new Storage(client);
storage.getFile(
"<BUCKET_ID>", // bucketId
"<FILE_ID>", // fileId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Storage;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Storage storage = new Storage(client);
storage.listFiles(
"<BUCKET_ID>", // bucketId
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,25 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Storage;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Storage storage = new Storage(client);
storage.updateFile(
"<BUCKET_ID>", // bucketId
"<FILE_ID>", // fileId
"<NAME>", // name (optional)
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,28 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.createMembership(
"<TEAM_ID>", // teamId
listOf(), // roles
"email@example.com", // email (optional)
"<USER_ID>", // userId (optional)
"+12065550100", // phone (optional)
"https://example.com", // url (optional)
"<NAME>", // name (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.create(
"<TEAM_ID>", // teamId
"<NAME>", // name
listOf(), // roles (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.deleteMembership(
"<TEAM_ID>", // teamId
"<MEMBERSHIP_ID>", // membershipId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.delete(
"<TEAM_ID>", // teamId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.getMembership(
"<TEAM_ID>", // teamId
"<MEMBERSHIP_ID>", // membershipId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.getPrefs(
"<TEAM_ID>", // teamId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.get(
"<TEAM_ID>", // teamId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.listMemberships(
"<TEAM_ID>", // teamId
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.list(
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,25 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.updateMembershipStatus(
"<TEAM_ID>", // teamId
"<MEMBERSHIP_ID>", // membershipId
"<USER_ID>", // userId
"<SECRET>", // secret
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.updateMembership(
"<TEAM_ID>", // teamId
"<MEMBERSHIP_ID>", // membershipId
listOf(), // roles
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://example.com/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Teams teams = new Teams(client);
teams.updateName(
"<TEAM_ID>", // teamId
"<NAME>", // name
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

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