-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
361 changed files
with
3,643 additions
and
4,496 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Appwrite Console SDK | ||
|
||
![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?style=flat-square) | ||
![Version](https://img.shields.io/badge/api%20version-1.4.13-blue.svg?style=flat-square) | ||
![Version](https://img.shields.io/badge/api%20version-1.5.0-blue.svg?style=flat-square) | ||
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) | ||
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) | ||
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) | ||
|
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console"; | |
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/[email protected].11"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/[email protected].12"></script> | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import { Client, AuthenticatorType, Account } from "@appwrite.io/console"; | ||
import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.addAuthenticator(AuthenticatorType.Totp); | ||
const result = await account.addAuthenticator( | ||
AuthenticatorType.Totp // type | ||
); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createAnonymousSession(); | ||
const result = await account.createAnonymousSession(); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createEmailPasswordSession('[email protected]', 'password'); | ||
const result = await account.createEmailPasswordSession( | ||
'[email protected]', // email | ||
'password' // password | ||
); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createEmailToken('[USER_ID]', '[email protected]'); | ||
const result = await account.createEmailToken( | ||
'[USER_ID]', // userId | ||
'[email protected]', // email | ||
false // phrase (optional) | ||
); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createJWT(); | ||
const result = await account.createJWT(); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createMagicURLToken('[USER_ID]', '[email protected]'); | ||
const result = await account.createMagicURLToken( | ||
'[USER_ID]', // userId | ||
'[email protected]', // email | ||
'https://example.com', // url (optional) | ||
false // phrase (optional) | ||
); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import { Client, OAuthProvider, Account } from "@appwrite.io/console"; | ||
import { Client, Account, OAuthProvider } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
// Go to OAuth provider login page | ||
account.createOAuth2Session(OAuthProvider.Amazon); | ||
account.createOAuth2Session( | ||
OAuthProvider.Amazon, // provider | ||
'https://example.com', // success (optional) | ||
'https://example.com', // failure (optional) | ||
false, // token (optional) | ||
[] // scopes (optional) | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createPhoneToken('[USER_ID]', '+12065550100'); | ||
const result = await account.createPhoneToken( | ||
'[USER_ID]', // userId | ||
'+12065550100' // phone | ||
); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createPhoneVerification(); | ||
const result = await account.createPhoneVerification(); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createPushTarget('[TARGET_ID]', '[IDENTIFIER]'); | ||
const result = await account.createPushTarget( | ||
'[TARGET_ID]', // targetId | ||
'[IDENTIFIER]', // identifier | ||
'[PROVIDER_ID]' // providerId (optional) | ||
); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createRecovery('[email protected]', 'https://example.com'); | ||
const result = await account.createRecovery( | ||
'[email protected]', // email | ||
'https://example.com' // url | ||
); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createSession('[USER_ID]', '[SECRET]'); | ||
const result = await account.createSession( | ||
'[USER_ID]', // userId | ||
'[SECRET]' // secret | ||
); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client(); | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
const promise = account.createVerification('https://example.com'); | ||
const result = await account.createVerification( | ||
'https://example.com' // url | ||
); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(response); |
Oops, something went wrong.