-
Notifications
You must be signed in to change notification settings - Fork 110
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
98 changed files
with
1,431 additions
and
1,602 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,21 +1,18 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.addAuthenticator( | ||
type: AuthenticatorType.totp.value, | ||
); | ||
Account account = Account(client); | ||
|
||
Future result = account.addAuthenticator( | ||
type: AuthenticatorType.totp, | ||
); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,19 +1,16 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.createAnonymousSession(); | ||
Account account = Account(client); | ||
|
||
Future result = account.createAnonymousSession(); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,22 +1,19 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.createEmailPasswordSession( | ||
email:'[email protected]' , | ||
password:'password' , | ||
); | ||
Account account = Account(client); | ||
|
||
Future result = account.createEmailPasswordSession( | ||
email: '[email protected]', | ||
password: 'password', | ||
); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,22 +1,20 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.createEmailToken( | ||
userId:'[USER_ID]' , | ||
email:'[email protected]' , | ||
); | ||
Account account = Account(client); | ||
|
||
Future result = account.createEmailToken( | ||
userId: '[USER_ID]', | ||
email: '[email protected]', | ||
phrase: false, // (optional) | ||
); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,19 +1,16 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.createJWT(); | ||
Account account = Account(client); | ||
|
||
Future result = account.createJWT(); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.createMagicURLToken( | ||
userId:'[USER_ID]' , | ||
email:'[email protected]' , | ||
); | ||
Account account = Account(client); | ||
|
||
Future result = account.createMagicURLToken( | ||
userId: '[USER_ID]', | ||
email: '[email protected]', | ||
url: 'https://example.com', // (optional) | ||
phrase: false, // (optional) | ||
); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.createOAuth2Session( | ||
provider: OAuthProvider.amazon.value, | ||
); | ||
Account account = Account(client); | ||
|
||
Future result = account.createOAuth2Session( | ||
provider: OAuthProvider.amazon, | ||
success: 'https://example.com', // (optional) | ||
failure: 'https://example.com', // (optional) | ||
token: false, // (optional) | ||
scopes: [], // (optional) | ||
); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,22 +1,19 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.createPhoneToken( | ||
userId:'[USER_ID]' , | ||
phone:'+12065550100' , | ||
); | ||
Account account = Account(client); | ||
|
||
Future result = account.createPhoneToken( | ||
userId: '[USER_ID]', | ||
phone: '+12065550100', | ||
); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,19 +1,16 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.createPhoneVerification(); | ||
Account account = Account(client); | ||
|
||
Future result = account.createPhoneVerification(); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,22 +1,20 @@ | ||
import 'package:appwrite/appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
Client client = Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
Future result = account.createPushTarget( | ||
targetId:'[TARGET_ID]' , | ||
identifier:'[IDENTIFIER]' , | ||
); | ||
Account account = Account(client); | ||
|
||
Future result = account.createPushTarget( | ||
targetId: '[TARGET_ID]', | ||
identifier: '[IDENTIFIER]', | ||
providerId: '[PROVIDER_ID]', // (optional) | ||
); | ||
|
||
result.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
Oops, something went wrong.