-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from appwrite/dev
Dev
- Loading branch information
Showing
347 changed files
with
9,196 additions
and
3,409 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
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,9 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
Session result = 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
Session result = await account.createEmailPasswordSession( | ||
email: 'email@example.com', | ||
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
Token result = await account.createEmailToken( | ||
userId: '<USER_ID>', | ||
email: 'email@example.com', | ||
phrase: false, // (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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
Jwt result = 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
Token result = await account.createMagicURLToken( | ||
userId: '<USER_ID>', | ||
email: 'email@example.com', | ||
url: 'https://example.com', // (optional) | ||
phrase: false, // (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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession(''); // The user session to authenticate with | ||
|
||
Account account = Account(client); | ||
|
||
MfaType result = await account.createMfaAuthenticator( | ||
type: AuthenticatorType.totp, | ||
); |
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,11 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
MfaChallenge result = await account.createMfaChallenge( | ||
factor: AuthenticationFactor.email, | ||
); |
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 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession(''); // The user session to authenticate with | ||
|
||
Account account = Account(client); | ||
|
||
MfaRecoveryCodes result = await account.createMfaRecoveryCodes(); |
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 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
await account.createOAuth2Token( | ||
provider: OAuthProvider.amazon, | ||
success: 'https://example.com', // (optional) | ||
failure: 'https://example.com', // (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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
Token result = await account.createPhoneToken( | ||
userId: '<USER_ID>', | ||
phone: '+12065550100', | ||
); |
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,21 +1,10 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
|
||
client | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
.setSession(''); // The user session to authenticate with | ||
|
||
Future result = account.createPhoneVerification(); | ||
Account account = Account(client); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} | ||
Token result = 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,24 +1,13 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
|
||
client | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
.setSession(''); // The user session to authenticate with | ||
|
||
Account account = Account(client); | ||
|
||
Future result = account.createRecovery( | ||
Token result = await account.createRecovery( | ||
email: 'email@example.com', | ||
url: 'https://example.com', | ||
); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
Session result = await account.createSession( | ||
userId: '<USER_ID>', | ||
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,23 +1,12 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
|
||
client | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
.setSession(''); // The user session to authenticate with | ||
|
||
Future result = account.createVerification( | ||
url: 'https://example.com', | ||
); | ||
Account account = Account(client); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} | ||
Token result = await account.createVerification( | ||
url: 'https://example.com', | ||
); |
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 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
Account account = Account(client); | ||
|
||
User result = await account.create( | ||
userId: '<USER_ID>', | ||
email: 'email@example.com', | ||
password: '', | ||
name: '<NAME>', // (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,23 +1,12 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
|
||
client | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
.setSession(''); // The user session to authenticate with | ||
|
||
Future result = account.deleteIdentity( | ||
identityId: '[IDENTITY_ID]', | ||
); | ||
Account account = Account(client); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} | ||
await account.deleteIdentity( | ||
identityId: '<IDENTITY_ID>', | ||
); |
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,13 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession(''); // The user session to authenticate with | ||
|
||
Account account = Account(client); | ||
|
||
await account.deleteMfaAuthenticator( | ||
type: AuthenticatorType.totp, | ||
otp: '<OTP>', | ||
); |
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,23 +1,12 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
|
||
client | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
.setSession(''); // The user session to authenticate with | ||
|
||
Future result = account.deleteSession( | ||
sessionId: '[SESSION_ID]', | ||
); | ||
Account account = Account(client); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} | ||
await account.deleteSession( | ||
sessionId: '<SESSION_ID>', | ||
); |
Oops, something went wrong.