-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added TypeScript support for optional parameters
- Loading branch information
Showing
113 changed files
with
1,257 additions
and
143 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,13 +1,10 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let promise = sdk.account.createOAuth2Session('bitbucket'); | ||
// Go to OAuth provider login page | ||
sdk.account.createOAuth2Session('amazon'); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); |
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
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
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
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
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
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
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
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
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,13 +1,10 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let promise = sdk.avatars.getBrowser('aa'); | ||
let result = sdk.avatars.getBrowser('aa'); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); | ||
console.log(result); // Resource 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,9 +1,10 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let result = sdk.avatars.getCreditCard('amex'); | ||
|
||
console.log(result); // Resource URL | ||
console.log(result); // Resource 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,9 +1,10 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let result = sdk.avatars.getFavicon('https://example.com'); | ||
|
||
console.log(result); // Resource URL | ||
console.log(result); // Resource 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,9 +1,10 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let result = sdk.avatars.getFlag('af'); | ||
|
||
console.log(result); // Resource URL | ||
console.log(result); // Resource 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,9 +1,10 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let result = sdk.avatars.getImage('https://example.com'); | ||
|
||
console.log(result); // Resource URL | ||
console.log(result); // Resource 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let result = sdk.avatars.getInitials(); | ||
|
||
console.log(result); // Resource 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,9 +1,10 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let result = sdk.avatars.getQR('[TEXT]'); | ||
|
||
console.log(result); // Resource URL | ||
console.log(result); // Resource 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
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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
// Go to OAuth provider login page | ||
sdk.account.createOAuth2Session('amazon'); | ||
|
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let promise = sdk.account.createSession('email@example.com', 'password'); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let promise = sdk.account.createVerification('https://example.com'); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
let sdk = new Appwrite(); | ||
|
||
sdk | ||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
let promise = sdk.account.create('email@example.com', 'password'); | ||
|
||
promise.then(function (response) { | ||
console.log(response); // Success | ||
}, function (error) { | ||
console.log(error); // Failure | ||
}); |
Oops, something went wrong.