Skip to content

Commit e402a3e

Browse files
updated spec
1 parent bd8f71e commit e402a3e

30 files changed

+2067
-40
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
88

9-
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-react-native/releases).**
9+
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-react-native/releases).**
1010

1111
Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the React Native SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1212

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
```javascript
2+
import { Client, Account } from "react-native-appwrite";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const account = new Account(client);
9+
10+
const result = await account.createBillingAddress({
11+
country: '<COUNTRY>',
12+
city: '<CITY>',
13+
streetAddress: '<STREET_ADDRESS>',
14+
addressLine2: '<ADDRESS_LINE2>', // optional
15+
state: '<STATE>', // optional
16+
postalCode: '<POSTAL_CODE>' // optional
17+
});
18+
19+
console.log(result);
20+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
```javascript
2+
import { Client, Account, Scopes } from "react-native-appwrite";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const account = new Account(client);
9+
10+
const result = await account.createKey({
11+
name: '<NAME>',
12+
scopes: [Scopes.Account],
13+
expire: '' // optional
14+
});
15+
16+
console.log(result);
17+
```
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
```javascript
2+
import { Client, Account } from "react-native-appwrite";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const account = new Account(client);
9+
10+
const result = await account.createPaymentMethod();
11+
12+
console.log(result);
13+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```javascript
2+
import { Client, Account } from "react-native-appwrite";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const account = new Account(client);
9+
10+
const result = await account.deleteBillingAddress({
11+
billingAddressId: '<BILLING_ADDRESS_ID>'
12+
});
13+
14+
console.log(result);
15+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```javascript
2+
import { Client, Account } from "react-native-appwrite";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const account = new Account(client);
9+
10+
const result = await account.deleteKey({
11+
keyId: '<KEY_ID>'
12+
});
13+
14+
console.log(result);
15+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```javascript
2+
import { Client, Account } from "react-native-appwrite";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const account = new Account(client);
9+
10+
const result = await account.deletePaymentMethod({
11+
paymentMethodId: '<PAYMENT_METHOD_ID>'
12+
});
13+
14+
console.log(result);
15+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```javascript
2+
import { Client, Account } from "react-native-appwrite";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const account = new Account(client);
9+
10+
const result = await account.getBillingAddress({
11+
billingAddressId: '<BILLING_ADDRESS_ID>'
12+
});
13+
14+
console.log(result);
15+
```

docs/examples/account/get-key.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```javascript
2+
import { Client, Account } from "react-native-appwrite";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const account = new Account(client);
9+
10+
const result = await account.getKey({
11+
keyId: '<KEY_ID>'
12+
});
13+
14+
console.log(result);
15+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```javascript
2+
import { Client, Account } from "react-native-appwrite";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const account = new Account(client);
9+
10+
const result = await account.getPaymentMethod({
11+
paymentMethodId: '<PAYMENT_METHOD_ID>'
12+
});
13+
14+
console.log(result);
15+
```

0 commit comments

Comments
 (0)