Release candidate for 1.5.x

This commit is contained in:
Jake Barnby
2024-02-05 23:39:15 +13:00
parent 5753d5716c
commit 3020664d09
121 changed files with 2427 additions and 400 deletions
@@ -8,9 +8,8 @@ void main() { // Init SDK
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePhoneSession(
userId: '[USER_ID]',
secret: '[SECRET]',
Future result = account.addAuthenticator(
factor: AuthenticatorFactor.totp.value,
);
result
@@ -8,9 +8,8 @@ void main() { // Init SDK
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createPhoneSession(
userId: '[USER_ID]',
phone: '+12065550100',
Future result = account.createChallenge(
provider: AuthenticatorProvider.totp.value,
);
result
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createEmailPasswordSession(
email:'email@example.com' ,
password:'password' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
@@ -8,9 +8,9 @@ void main() { // Init SDK
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createEmailSession(
email: 'email@example.com',
password: 'password',
Future result = account.createEmailToken(
userId:'[USER_ID]' ,
email:'email@example.com' ,
);
result
@@ -8,9 +8,9 @@ void main() { // Init SDK
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createMagicURLSession(
userId: '[USER_ID]',
email: 'email@example.com',
Future result = account.createMagicURLToken(
userId:'[USER_ID]' ,
email:'email@example.com' ,
);
result
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createOAuth2Session(
provider: 'amazon',
provider: OAuthProvider.amazon.value,
);
result
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createPhoneToken(
userId:'[USER_ID]' ,
phone:'+12065550100' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createPushTarget(
targetId:'[TARGET_ID]' ,
identifier:'[IDENTIFIER]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createRecovery(
email: 'email@example.com',
url: 'https://example.com',
email:'email@example.com' ,
url:'https://example.com' ,
);
result
+22
View File
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createSession(
userId:'[USER_ID]' ,
secret:'[SECRET]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createVerification(
url: 'https://example.com',
url:'https://example.com' ,
);
result
+3 -3
View File
@@ -9,9 +9,9 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.create(
userId: '[USER_ID]',
email: 'email@example.com',
password: '',
userId:'[USER_ID]' ,
email:'email@example.com' ,
password:'' ,
);
result
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.deleteAuthenticator(
provider: AuthenticatorProvider.totp.value,
otp:'[OTP]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.deleteIdentity(
identityId: '[IDENTITY_ID]',
identityId:'[IDENTITY_ID]' ,
);
result
@@ -0,0 +1,21 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.deletePushTarget(
targetId:'[TARGET_ID]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.deleteSession(
sessionId: '[SESSION_ID]',
sessionId:'[SESSION_ID]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.getSession(
sessionId: '[SESSION_ID]',
sessionId:'[SESSION_ID]' ,
);
result
+19
View File
@@ -0,0 +1,19 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.listFactors();
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+22
View File
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateChallenge(
challengeId:'[CHALLENGE_ID]' ,
otp:'[OTP]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateEmail(
email: 'email@example.com',
password: 'password',
email:'email@example.com' ,
password:'password' ,
);
result
+21
View File
@@ -0,0 +1,21 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateMFA(
mfa:false ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateMagicURLSession(
userId: '[USER_ID]',
secret: '[SECRET]',
userId:'[USER_ID]' ,
secret:'[SECRET]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateName(
name: '[NAME]',
name:'[NAME]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePassword(
password: '',
password:'' ,
);
result
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePhoneVerification(
userId: '[USER_ID]',
secret: '[SECRET]',
userId:'[USER_ID]' ,
secret:'[SECRET]' ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePhone(
phone: '+12065550100',
password: 'password',
phone:'+12065550100' ,
password:'password' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePrefs(
prefs: {},
prefs:{} ,
);
result
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePushTarget(
targetId:'[TARGET_ID]' ,
identifier:'[IDENTIFIER]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+3 -4
View File
@@ -9,10 +9,9 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateRecovery(
userId: '[USER_ID]',
secret: '[SECRET]',
password: 'password',
passwordAgain: 'password',
userId:'[USER_ID]' ,
secret:'[SECRET]' ,
password:'' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateSession(
sessionId: '[SESSION_ID]',
sessionId:'[SESSION_ID]' ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateVerification(
userId: '[USER_ID]',
secret: '[SECRET]',
userId:'[USER_ID]' ,
secret:'[SECRET]' ,
);
result
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.verifyAuthenticator(
factor: AuthenticatorFactor.totp.value,
otp:'[OTP]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+2 -2
View File
@@ -10,7 +10,7 @@ void main() { // Init SDK
;
// downloading file
Future result = avatars.getBrowser(
code: 'aa',
code: Browser.avantBrowser.value,
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
@@ -22,7 +22,7 @@ void main() { // Init SDK
//displaying image preview
FutureBuilder(
future: avatars.getBrowser(
code: 'aa',
code: Browser.avantBrowser.value,
), //works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
+2 -2
View File
@@ -10,7 +10,7 @@ void main() { // Init SDK
;
// downloading file
Future result = avatars.getCreditCard(
code: 'amex',
code: CreditCard.americanExpress.value,
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
@@ -22,7 +22,7 @@ void main() { // Init SDK
//displaying image preview
FutureBuilder(
future: avatars.getCreditCard(
code: 'amex',
code: CreditCard.americanExpress.value,
), //works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
+2 -2
View File
@@ -10,7 +10,7 @@ void main() { // Init SDK
;
// downloading file
Future result = avatars.getFavicon(
url: 'https://example.com',
url:'https://example.com' ,
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
@@ -22,7 +22,7 @@ void main() { // Init SDK
//displaying image preview
FutureBuilder(
future: avatars.getFavicon(
url: 'https://example.com',
url:'https://example.com' ,
), //works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
+2 -2
View File
@@ -10,7 +10,7 @@ void main() { // Init SDK
;
// downloading file
Future result = avatars.getFlag(
code: 'af',
code: Flag.afghanistan.value,
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
@@ -22,7 +22,7 @@ void main() { // Init SDK
//displaying image preview
FutureBuilder(
future: avatars.getFlag(
code: 'af',
code: Flag.afghanistan.value,
), //works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
+2 -2
View File
@@ -10,7 +10,7 @@ void main() { // Init SDK
;
// downloading file
Future result = avatars.getImage(
url: 'https://example.com',
url:'https://example.com' ,
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
@@ -22,7 +22,7 @@ void main() { // Init SDK
//displaying image preview
FutureBuilder(
future: avatars.getImage(
url: 'https://example.com',
url:'https://example.com' ,
), //works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
+2 -2
View File
@@ -10,7 +10,7 @@ void main() { // Init SDK
;
// downloading file
Future result = avatars.getQR(
text: '[TEXT]',
text:'[TEXT]' ,
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
@@ -22,7 +22,7 @@ void main() { // Init SDK
//displaying image preview
FutureBuilder(
future: avatars.getQR(
text: '[TEXT]',
text:'[TEXT]' ,
), //works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
+4 -4
View File
@@ -9,10 +9,10 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = databases.createDocument(
databaseId: '[DATABASE_ID]',
collectionId: '[COLLECTION_ID]',
documentId: '[DOCUMENT_ID]',
data: {},
databaseId:'[DATABASE_ID]' ,
collectionId:'[COLLECTION_ID]' ,
documentId:'[DOCUMENT_ID]' ,
data:{} ,
);
result
+3 -3
View File
@@ -9,9 +9,9 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = databases.deleteDocument(
databaseId: '[DATABASE_ID]',
collectionId: '[COLLECTION_ID]',
documentId: '[DOCUMENT_ID]',
databaseId:'[DATABASE_ID]' ,
collectionId:'[COLLECTION_ID]' ,
documentId:'[DOCUMENT_ID]' ,
);
result
+3 -3
View File
@@ -9,9 +9,9 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = databases.getDocument(
databaseId: '[DATABASE_ID]',
collectionId: '[COLLECTION_ID]',
documentId: '[DOCUMENT_ID]',
databaseId:'[DATABASE_ID]' ,
collectionId:'[COLLECTION_ID]' ,
documentId:'[DOCUMENT_ID]' ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = databases.listDocuments(
databaseId: '[DATABASE_ID]',
collectionId: '[COLLECTION_ID]',
databaseId:'[DATABASE_ID]' ,
collectionId:'[COLLECTION_ID]' ,
);
result
+3 -3
View File
@@ -9,9 +9,9 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = databases.updateDocument(
databaseId: '[DATABASE_ID]',
collectionId: '[COLLECTION_ID]',
documentId: '[DOCUMENT_ID]',
databaseId:'[DATABASE_ID]' ,
collectionId:'[COLLECTION_ID]' ,
documentId:'[DOCUMENT_ID]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = functions.createExecution(
functionId: '[FUNCTION_ID]',
functionId:'[FUNCTION_ID]' ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = functions.getExecution(
functionId: '[FUNCTION_ID]',
executionId: '[EXECUTION_ID]',
functionId:'[FUNCTION_ID]' ,
executionId:'[EXECUTION_ID]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = functions.listExecutions(
functionId: '[FUNCTION_ID]',
functionId:'[FUNCTION_ID]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = graphql.mutation(
query: {},
query:{} ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = graphql.query(
query: {},
query:{} ,
);
result
@@ -0,0 +1,23 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Messaging messaging = Messaging(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = messaging.createSubscriber(
topicId:'[TOPIC_ID]' ,
subscriberId:'[SUBSCRIBER_ID]' ,
targetId:'[TARGET_ID]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Messaging messaging = Messaging(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = messaging.deleteSubscriber(
topicId:'[TOPIC_ID]' ,
subscriberId:'[SUBSCRIBER_ID]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+3 -3
View File
@@ -10,9 +10,9 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = storage.createFile(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'),
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
file:InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg') ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = storage.deleteFile(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
);
result
+4 -4
View File
@@ -10,8 +10,8 @@ void main() { // Init SDK
;
// downloading file
Future result = storage.getFileDownload(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
@@ -23,8 +23,8 @@ void main() { // Init SDK
//displaying image preview
FutureBuilder(
future: storage.getFileDownload(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
), //works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
+4 -4
View File
@@ -10,8 +10,8 @@ void main() { // Init SDK
;
// downloading file
Future result = storage.getFilePreview(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
@@ -23,8 +23,8 @@ void main() { // Init SDK
//displaying image preview
FutureBuilder(
future: storage.getFilePreview(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
), //works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
+4 -4
View File
@@ -10,8 +10,8 @@ void main() { // Init SDK
;
// downloading file
Future result = storage.getFileView(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
@@ -23,8 +23,8 @@ void main() { // Init SDK
//displaying image preview
FutureBuilder(
future: storage.getFileView(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
), //works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = storage.getFile(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = storage.listFiles(
bucketId: '[BUCKET_ID]',
bucketId:'[BUCKET_ID]' ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = storage.updateFile(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
bucketId:'[BUCKET_ID]' ,
fileId:'[FILE_ID]' ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.createMembership(
teamId: '[TEAM_ID]',
roles: [],
teamId:'[TEAM_ID]' ,
roles:[] ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.create(
teamId: '[TEAM_ID]',
name: '[NAME]',
teamId:'[TEAM_ID]' ,
name:'[NAME]' ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.deleteMembership(
teamId: '[TEAM_ID]',
membershipId: '[MEMBERSHIP_ID]',
teamId:'[TEAM_ID]' ,
membershipId:'[MEMBERSHIP_ID]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.delete(
teamId: '[TEAM_ID]',
teamId:'[TEAM_ID]' ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.getMembership(
teamId: '[TEAM_ID]',
membershipId: '[MEMBERSHIP_ID]',
teamId:'[TEAM_ID]' ,
membershipId:'[MEMBERSHIP_ID]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.getPrefs(
teamId: '[TEAM_ID]',
teamId:'[TEAM_ID]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.get(
teamId: '[TEAM_ID]',
teamId:'[TEAM_ID]' ,
);
result
+1 -1
View File
@@ -9,7 +9,7 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.listMemberships(
teamId: '[TEAM_ID]',
teamId:'[TEAM_ID]' ,
);
result
@@ -9,10 +9,10 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.updateMembershipStatus(
teamId: '[TEAM_ID]',
membershipId: '[MEMBERSHIP_ID]',
userId: '[USER_ID]',
secret: '[SECRET]',
teamId:'[TEAM_ID]' ,
membershipId:'[MEMBERSHIP_ID]' ,
userId:'[USER_ID]' ,
secret:'[SECRET]' ,
);
result
+3 -3
View File
@@ -9,9 +9,9 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.updateMembership(
teamId: '[TEAM_ID]',
membershipId: '[MEMBERSHIP_ID]',
roles: [],
teamId:'[TEAM_ID]' ,
membershipId:'[MEMBERSHIP_ID]' ,
roles:[] ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.updateName(
teamId: '[TEAM_ID]',
name: '[NAME]',
teamId:'[TEAM_ID]' ,
name:'[NAME]' ,
);
result
+2 -2
View File
@@ -9,8 +9,8 @@ void main() { // Init SDK
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = teams.updatePrefs(
teamId: '[TEAM_ID]',
prefs: {},
teamId:'[TEAM_ID]' ,
prefs:{} ,
);
result
@@ -0,0 +1,23 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Users users = Users(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = users.deleteAuthenticator(
userId:'[USER_ID]' ,
provider: AuthenticatorProvider.totp.value,
otp:'[OTP]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
+21
View File
@@ -0,0 +1,21 @@
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Users users = Users(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = users.listProviders(
userId:'[USER_ID]' ,
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}