-
Notifications
You must be signed in to change notification settings - Fork 40
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
281 changed files
with
2,848 additions
and
3,654 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
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,20 +1,12 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession('') // The user session to authenticate with | ||
; | ||
.setSession(''); // The user session to authenticate with | ||
|
||
const promise = account.addAuthenticator(sdk.AuthenticatorType.Totp); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.addAuthenticator( | ||
sdk.AuthenticatorType.Totp // type | ||
); |
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,19 +1,9 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const promise = account.createAnonymousSession(); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createAnonymousSession(); |
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,19 +1,12 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const promise = account.createEmailPasswordSession('email@example.com', 'password'); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createEmailPasswordSession( | ||
'email@example.com', // email | ||
'password' // password | ||
); |
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,19 +1,13 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const promise = account.createEmailToken('[USER_ID]', 'email@example.com'); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createEmailToken( | ||
'[USER_ID]', // userId | ||
'email@example.com', // email | ||
false // phrase (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,19 +1,9 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const promise = account.createJWT(); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createJWT(); |
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,19 +1,14 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const promise = account.createMagicURLToken('[USER_ID]', 'email@example.com'); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createMagicURLToken( | ||
'[USER_ID]', // userId | ||
'email@example.com', // email | ||
'https://example.com', // url (optional) | ||
false // phrase (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,19 +1,15 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const promise = account.createOAuth2Session(sdk.OAuthProvider.Amazon); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createOAuth2Session( | ||
sdk.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,19 +1,12 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const promise = account.createPhoneToken('[USER_ID]', '+12065550100'); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createPhoneToken( | ||
'[USER_ID]', // userId | ||
'+12065550100' // phone | ||
); |
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,20 +1,10 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession('') // The user session to authenticate with | ||
; | ||
.setSession(''); // The user session to authenticate with | ||
|
||
const promise = account.createPhoneVerification(); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createPhoneVerification(); |
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,20 +1,13 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession('') // The user session to authenticate with | ||
; | ||
.setSession(''); // The user session to authenticate with | ||
|
||
const promise = account.createRecovery('email@example.com', 'https://example.com'); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createRecovery( | ||
'email@example.com', // email | ||
'https://example.com' // url | ||
); |
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,19 +1,12 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const promise = account.createSession('[USER_ID]', '[SECRET]'); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createSession( | ||
'[USER_ID]', // userId | ||
'[SECRET]' // secret | ||
); |
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,20 +1,12 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession('') // The user session to authenticate with | ||
; | ||
.setSession(''); // The user session to authenticate with | ||
|
||
const promise = account.createVerification('https://example.com'); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createVerification( | ||
'https://example.com' // url | ||
); |
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,19 +1,14 @@ | ||
const sdk = require('node-appwrite'); | ||
|
||
// Init SDK | ||
const client = new sdk.Client(); | ||
|
||
const account = new sdk.Account(client); | ||
|
||
client | ||
const client = new sdk.Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const promise = account.create('[USER_ID]', 'email@example.com', ''); | ||
const account = new sdk.Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.create( | ||
'[USER_ID]', // userId | ||
'email@example.com', // email | ||
'', // password | ||
'[NAME]' // name (optional) | ||
); |
Oops, something went wrong.