react-native-appwrite 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/autoclose.yml +11 -0
- package/README.md +2 -2
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/sdk.js +20 -17
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/package.json +3 -0
- package/dist/esm/sdk.js +20 -17
- package/dist/esm/sdk.js.map +1 -1
- package/docs/examples/account/create-anonymous-session.md +2 -2
- package/docs/examples/account/create-email-password-session.md +2 -2
- package/docs/examples/account/create-email-token.md +2 -2
- package/docs/examples/account/create-j-w-t.md +2 -2
- package/docs/examples/account/create-magic-u-r-l-token.md +2 -2
- package/docs/examples/account/create-mfa-authenticator.md +2 -2
- package/docs/examples/account/create-mfa-challenge.md +2 -2
- package/docs/examples/account/create-mfa-recovery-codes.md +2 -2
- package/docs/examples/account/create-o-auth2session.md +1 -1
- package/docs/examples/account/create-o-auth2token.md +1 -1
- package/docs/examples/account/create-phone-token.md +2 -2
- package/docs/examples/account/create-phone-verification.md +2 -2
- package/docs/examples/account/create-push-target.md +2 -2
- package/docs/examples/account/create-recovery.md +2 -2
- package/docs/examples/account/create-session.md +2 -2
- package/docs/examples/account/create-verification.md +2 -2
- package/docs/examples/account/create.md +2 -2
- package/docs/examples/account/delete-identity.md +2 -2
- package/docs/examples/account/delete-mfa-authenticator.md +3 -4
- package/docs/examples/account/delete-push-target.md +2 -2
- package/docs/examples/account/delete-session.md +2 -2
- package/docs/examples/account/delete-sessions.md +2 -2
- package/docs/examples/account/get-mfa-recovery-codes.md +2 -2
- package/docs/examples/account/get-prefs.md +2 -2
- package/docs/examples/account/get-session.md +2 -2
- package/docs/examples/account/get.md +2 -2
- package/docs/examples/account/list-identities.md +2 -2
- package/docs/examples/account/list-logs.md +2 -2
- package/docs/examples/account/list-mfa-factors.md +2 -2
- package/docs/examples/account/list-sessions.md +2 -2
- package/docs/examples/account/update-email.md +2 -2
- package/docs/examples/account/update-m-f-a.md +2 -2
- package/docs/examples/account/update-magic-u-r-l-session.md +2 -2
- package/docs/examples/account/update-mfa-authenticator.md +2 -2
- package/docs/examples/account/update-mfa-challenge.md +2 -2
- package/docs/examples/account/update-mfa-recovery-codes.md +2 -2
- package/docs/examples/account/update-name.md +2 -2
- package/docs/examples/account/update-password.md +2 -2
- package/docs/examples/account/update-phone-session.md +2 -2
- package/docs/examples/account/update-phone-verification.md +2 -2
- package/docs/examples/account/update-phone.md +2 -2
- package/docs/examples/account/update-prefs.md +2 -2
- package/docs/examples/account/update-push-target.md +2 -2
- package/docs/examples/account/update-recovery.md +2 -2
- package/docs/examples/account/update-session.md +2 -2
- package/docs/examples/account/update-status.md +2 -2
- package/docs/examples/account/update-verification.md +2 -2
- package/docs/examples/avatars/get-browser.md +1 -1
- package/docs/examples/avatars/get-credit-card.md +1 -1
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +1 -1
- package/docs/examples/avatars/get-image.md +1 -1
- package/docs/examples/avatars/get-initials.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/databases/create-document.md +2 -2
- package/docs/examples/databases/delete-document.md +2 -2
- package/docs/examples/databases/get-document.md +2 -2
- package/docs/examples/databases/list-documents.md +2 -2
- package/docs/examples/databases/update-document.md +2 -2
- package/docs/examples/functions/create-execution.md +4 -3
- package/docs/examples/functions/get-execution.md +2 -2
- package/docs/examples/functions/list-executions.md +2 -2
- package/docs/examples/graphql/mutation.md +2 -2
- package/docs/examples/graphql/query.md +2 -2
- package/docs/examples/locale/get.md +2 -2
- package/docs/examples/locale/list-codes.md +2 -2
- package/docs/examples/locale/list-continents.md +2 -2
- package/docs/examples/locale/list-countries-e-u.md +2 -2
- package/docs/examples/locale/list-countries-phones.md +2 -2
- package/docs/examples/locale/list-countries.md +2 -2
- package/docs/examples/locale/list-currencies.md +2 -2
- package/docs/examples/locale/list-languages.md +2 -2
- package/docs/examples/messaging/create-subscriber.md +2 -2
- package/docs/examples/messaging/delete-subscriber.md +2 -2
- package/docs/examples/storage/create-file.md +2 -2
- package/docs/examples/storage/delete-file.md +2 -2
- package/docs/examples/storage/get-file-download.md +1 -1
- package/docs/examples/storage/get-file-preview.md +1 -1
- package/docs/examples/storage/get-file-view.md +1 -1
- package/docs/examples/storage/get-file.md +2 -2
- package/docs/examples/storage/list-files.md +2 -2
- package/docs/examples/storage/update-file.md +2 -2
- package/docs/examples/teams/create-membership.md +2 -2
- package/docs/examples/teams/create.md +2 -2
- package/docs/examples/teams/delete-membership.md +2 -2
- package/docs/examples/teams/delete.md +2 -2
- package/docs/examples/teams/get-membership.md +2 -2
- package/docs/examples/teams/get-prefs.md +2 -2
- package/docs/examples/teams/get.md +2 -2
- package/docs/examples/teams/list-memberships.md +2 -2
- package/docs/examples/teams/list.md +2 -2
- package/docs/examples/teams/update-membership-status.md +2 -2
- package/docs/examples/teams/update-membership.md +2 -2
- package/docs/examples/teams/update-name.md +2 -2
- package/docs/examples/teams/update-prefs.md +2 -2
- package/package.json +1 -1
- package/src/client.ts +7 -2
- package/src/enums/credit-card.ts +1 -1
- package/src/models.ts +4 -0
- package/src/services/account.ts +6 -15
- package/src/services/avatars.ts +2 -0
- package/src/services/functions.ts +6 -1
- package/types/enums/credit-card.d.ts +1 -1
- package/types/models.d.ts +4 -0
- package/types/services/account.d.ts +5 -6
- package/types/services/avatars.d.ts +2 -0
- package/types/services/functions.d.ts +2 -1
|
@@ -2,7 +2,7 @@ import { Client, Account } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
@@ -11,4 +11,4 @@ const result = await account.updatePushTarget(
|
|
|
11
11
|
'<IDENTIFIER>' // identifier
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
console.log(
|
|
14
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Account } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
@@ -12,4 +12,4 @@ const result = await account.updateRecovery(
|
|
|
12
12
|
'' // password
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
console.log(
|
|
15
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Account } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
@@ -10,4 +10,4 @@ const result = await account.updateSession(
|
|
|
10
10
|
'<SESSION_ID>' // sessionId
|
|
11
11
|
);
|
|
12
12
|
|
|
13
|
-
console.log(
|
|
13
|
+
console.log(result);
|
|
@@ -2,10 +2,10 @@ import { Client, Account } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
9
|
const result = await account.updateStatus();
|
|
10
10
|
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Account } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
@@ -11,4 +11,4 @@ const result = await account.updateVerification(
|
|
|
11
11
|
'<SECRET>' // secret
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
console.log(
|
|
14
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Avatars, Browser } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Avatars, CreditCard } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Avatars } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Avatars, Flag } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Avatars } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Avatars } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Avatars } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Databases } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const databases = new Databases(client);
|
|
8
8
|
|
|
@@ -14,4 +14,4 @@ const result = await databases.createDocument(
|
|
|
14
14
|
["read("any")"] // permissions (optional)
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
console.log(
|
|
17
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Databases } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const databases = new Databases(client);
|
|
8
8
|
|
|
@@ -12,4 +12,4 @@ const result = await databases.deleteDocument(
|
|
|
12
12
|
'<DOCUMENT_ID>' // documentId
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
console.log(
|
|
15
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Databases } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const databases = new Databases(client);
|
|
8
8
|
|
|
@@ -13,4 +13,4 @@ const result = await databases.getDocument(
|
|
|
13
13
|
[] // queries (optional)
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
-
console.log(
|
|
16
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Databases } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const databases = new Databases(client);
|
|
8
8
|
|
|
@@ -12,4 +12,4 @@ const result = await databases.listDocuments(
|
|
|
12
12
|
[] // queries (optional)
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
console.log(
|
|
15
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Databases } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const databases = new Databases(client);
|
|
8
8
|
|
|
@@ -14,4 +14,4 @@ const result = await databases.updateDocument(
|
|
|
14
14
|
["read("any")"] // permissions (optional)
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
console.log(
|
|
17
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Functions, ExecutionMethod } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const functions = new Functions(client);
|
|
8
8
|
|
|
@@ -12,7 +12,8 @@ const result = await functions.createExecution(
|
|
|
12
12
|
false, // async (optional)
|
|
13
13
|
'<PATH>', // path (optional)
|
|
14
14
|
ExecutionMethod.GET, // method (optional)
|
|
15
|
-
{} // headers (optional)
|
|
15
|
+
{}, // headers (optional)
|
|
16
|
+
'' // scheduledAt (optional)
|
|
16
17
|
);
|
|
17
18
|
|
|
18
|
-
console.log(
|
|
19
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Functions } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const functions = new Functions(client);
|
|
8
8
|
|
|
@@ -11,4 +11,4 @@ const result = await functions.getExecution(
|
|
|
11
11
|
'<EXECUTION_ID>' // executionId
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
console.log(
|
|
14
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Functions } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const functions = new Functions(client);
|
|
8
8
|
|
|
@@ -12,4 +12,4 @@ const result = await functions.listExecutions(
|
|
|
12
12
|
'<SEARCH>' // search (optional)
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
console.log(
|
|
15
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Graphql } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const graphql = new Graphql(client);
|
|
8
8
|
|
|
@@ -10,4 +10,4 @@ const result = await graphql.mutation(
|
|
|
10
10
|
{} // query
|
|
11
11
|
);
|
|
12
12
|
|
|
13
|
-
console.log(
|
|
13
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Graphql } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const graphql = new Graphql(client);
|
|
8
8
|
|
|
@@ -10,4 +10,4 @@ const result = await graphql.query(
|
|
|
10
10
|
{} // query
|
|
11
11
|
);
|
|
12
12
|
|
|
13
|
-
console.log(
|
|
13
|
+
console.log(result);
|
|
@@ -2,10 +2,10 @@ import { Client, Locale } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const locale = new Locale(client);
|
|
8
8
|
|
|
9
9
|
const result = await locale.get();
|
|
10
10
|
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(result);
|
|
@@ -2,10 +2,10 @@ import { Client, Locale } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const locale = new Locale(client);
|
|
8
8
|
|
|
9
9
|
const result = await locale.listCodes();
|
|
10
10
|
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(result);
|
|
@@ -2,10 +2,10 @@ import { Client, Locale } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const locale = new Locale(client);
|
|
8
8
|
|
|
9
9
|
const result = await locale.listContinents();
|
|
10
10
|
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(result);
|
|
@@ -2,10 +2,10 @@ import { Client, Locale } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const locale = new Locale(client);
|
|
8
8
|
|
|
9
9
|
const result = await locale.listCountriesEU();
|
|
10
10
|
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(result);
|
|
@@ -2,10 +2,10 @@ import { Client, Locale } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const locale = new Locale(client);
|
|
8
8
|
|
|
9
9
|
const result = await locale.listCountriesPhones();
|
|
10
10
|
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(result);
|
|
@@ -2,10 +2,10 @@ import { Client, Locale } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const locale = new Locale(client);
|
|
8
8
|
|
|
9
9
|
const result = await locale.listCountries();
|
|
10
10
|
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(result);
|
|
@@ -2,10 +2,10 @@ import { Client, Locale } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const locale = new Locale(client);
|
|
8
8
|
|
|
9
9
|
const result = await locale.listCurrencies();
|
|
10
10
|
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(result);
|
|
@@ -2,10 +2,10 @@ import { Client, Locale } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const locale = new Locale(client);
|
|
8
8
|
|
|
9
9
|
const result = await locale.listLanguages();
|
|
10
10
|
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Messaging } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const messaging = new Messaging(client);
|
|
8
8
|
|
|
@@ -12,4 +12,4 @@ const result = await messaging.createSubscriber(
|
|
|
12
12
|
'<TARGET_ID>' // targetId
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
console.log(
|
|
15
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Messaging } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const messaging = new Messaging(client);
|
|
8
8
|
|
|
@@ -11,4 +11,4 @@ const result = await messaging.deleteSubscriber(
|
|
|
11
11
|
'<SUBSCRIBER_ID>' // subscriberId
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
console.log(
|
|
14
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Storage } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const storage = new Storage(client);
|
|
8
8
|
|
|
@@ -13,4 +13,4 @@ const result = await storage.createFile(
|
|
|
13
13
|
["read("any")"] // permissions (optional)
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
-
console.log(
|
|
16
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Storage } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const storage = new Storage(client);
|
|
8
8
|
|
|
@@ -11,4 +11,4 @@ const result = await storage.deleteFile(
|
|
|
11
11
|
'<FILE_ID>' // fileId
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
console.log(
|
|
14
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Storage } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const storage = new Storage(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Storage, ImageGravity, ImageFormat } from "react-native-appwrit
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const storage = new Storage(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Storage } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const storage = new Storage(client);
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Storage } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const storage = new Storage(client);
|
|
8
8
|
|
|
@@ -11,4 +11,4 @@ const result = await storage.getFile(
|
|
|
11
11
|
'<FILE_ID>' // fileId
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
console.log(
|
|
14
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Storage } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const storage = new Storage(client);
|
|
8
8
|
|
|
@@ -12,4 +12,4 @@ const result = await storage.listFiles(
|
|
|
12
12
|
'<SEARCH>' // search (optional)
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
console.log(
|
|
15
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Storage } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const storage = new Storage(client);
|
|
8
8
|
|
|
@@ -13,4 +13,4 @@ const result = await storage.updateFile(
|
|
|
13
13
|
["read("any")"] // permissions (optional)
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
-
console.log(
|
|
16
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Teams } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
@@ -16,4 +16,4 @@ const result = await teams.createMembership(
|
|
|
16
16
|
'<NAME>' // name (optional)
|
|
17
17
|
);
|
|
18
18
|
|
|
19
|
-
console.log(
|
|
19
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Teams } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
@@ -12,4 +12,4 @@ const result = await teams.create(
|
|
|
12
12
|
[] // roles (optional)
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
console.log(
|
|
15
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Teams } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
@@ -11,4 +11,4 @@ const result = await teams.deleteMembership(
|
|
|
11
11
|
'<MEMBERSHIP_ID>' // membershipId
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
console.log(
|
|
14
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Teams } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
@@ -10,4 +10,4 @@ const result = await teams.delete(
|
|
|
10
10
|
'<TEAM_ID>' // teamId
|
|
11
11
|
);
|
|
12
12
|
|
|
13
|
-
console.log(
|
|
13
|
+
console.log(result);
|
|
@@ -2,7 +2,7 @@ import { Client, Teams } from "react-native-appwrite";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.setProject('
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
@@ -11,4 +11,4 @@ const result = await teams.getMembership(
|
|
|
11
11
|
'<MEMBERSHIP_ID>' // membershipId
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
console.log(
|
|
14
|
+
console.log(result);
|