Release candidate for 1.5.x

This commit is contained in:
Jake Barnby
2024-02-27 20:33:14 +13:00
parent 4adba1f6ec
commit 1dacc5d3ef
99 changed files with 708 additions and 1225 deletions
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.addAuthenticator(
type: AuthenticatorType.totp,
MfaType result = await account.addAuthenticator(
type: AuthenticatorType.totp,
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createAnonymousSession();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
Session result = await account.createAnonymousSession();
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createChallenge(
factor: AuthenticationFactor.totp,
MfaChallenge result = await account.createChallenge(
factor: AuthenticationFactor.totp,
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createEmailPasswordSession(
email: 'email@example.com',
password: 'password',
Session result = await account.createEmailPasswordSession(
email: 'email@example.com',
password: 'password',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createEmailToken(
userId: '<USER_ID>',
email: 'email@example.com',
phrase: false, // (optional)
Token result = await account.createEmailToken(
userId: '<USER_ID>',
email: 'email@example.com',
phrase: false, // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createJWT();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
Jwt result = await account.createJWT();
@@ -1,21 +1,14 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createMagicURLToken(
userId: '<USER_ID>',
email: 'email@example.com',
url: 'https://example.com', // (optional)
phrase: false, // (optional)
Token result = await account.createMagicURLToken(
userId: '<USER_ID>',
email: 'email@example.com',
url: 'https://example.com', // optional
phrase: false, // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+7 -14
View File
@@ -1,21 +1,14 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createOAuth2Session(
provider: OAuthProvider.amazon,
success: 'https://example.com', // (optional)
failure: 'https://example.com', // (optional)
scopes: [], // (optional)
await account.createOAuth2Session(
provider: OAuthProvider.amazon,
success: 'https://example.com', // optional
failure: 'https://example.com', // optional
scopes: [], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+7 -14
View File
@@ -1,21 +1,14 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createOAuth2Token(
provider: OAuthProvider.amazon,
success: 'https://example.com', // (optional)
failure: 'https://example.com', // (optional)
scopes: [], // (optional)
await account.createOAuth2Token(
provider: OAuthProvider.amazon,
success: 'https://example.com', // optional
failure: 'https://example.com', // optional
scopes: [], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createPhoneToken(
userId: '<USER_ID>',
phone: '+12065550100',
Token result = await account.createPhoneToken(
userId: '<USER_ID>',
phone: '+12065550100',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createPhoneVerification();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
Token result = await account.createPhoneVerification();
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createPushTarget(
targetId: '<TARGET_ID>',
identifier: '<IDENTIFIER>',
providerId: '<PROVIDER_ID>', // (optional)
Target result = await account.createPushTarget(
targetId: '<TARGET_ID>',
identifier: '<IDENTIFIER>',
providerId: '<PROVIDER_ID>', // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createRecovery(
email: 'email@example.com',
url: 'https://example.com',
Token result = await account.createRecovery(
email: 'email@example.com',
url: 'https://example.com',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createSession(
userId: '<USER_ID>',
secret: '<SECRET>',
Session result = await account.createSession(
userId: '<USER_ID>',
secret: '<SECRET>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.createVerification(
url: 'https://example.com',
Token result = await account.createVerification(
url: 'https://example.com',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+7 -14
View File
@@ -1,21 +1,14 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.create(
userId: '<USER_ID>',
email: 'email@example.com',
password: '',
name: '<NAME>', // (optional)
User result = await account.create(
userId: '<USER_ID>',
email: 'email@example.com',
password: '',
name: '<NAME>', // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.deleteAuthenticator(
type: AuthenticatorType.totp,
otp: '<OTP>',
await account.deleteAuthenticator(
type: AuthenticatorType.totp,
otp: '<OTP>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.deleteIdentity(
identityId: '<IDENTITY_ID>',
await account.deleteIdentity(
identityId: '<IDENTITY_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.deletePushTarget(
targetId: '<TARGET_ID>',
await account.deletePushTarget(
targetId: '<TARGET_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.deleteSession(
sessionId: '<SESSION_ID>',
await account.deleteSession(
sessionId: '<SESSION_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.deleteSessions();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
await account.deleteSessions();
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.getPrefs();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
Preferences result = await account.getPrefs();
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.getSession(
sessionId: '<SESSION_ID>',
Session result = await account.getSession(
sessionId: '<SESSION_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.get();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
User result = await account.get();
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.listFactors();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
MfaFactors result = await account.listFactors();
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.listIdentities(
queries: [], // (optional)
IdentityList result = await account.listIdentities(
queries: [], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.listLogs(
queries: [], // (optional)
LogList result = await account.listLogs(
queries: [], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.listSessions();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
SessionList result = await account.listSessions();
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updateChallenge(
challengeId: '<CHALLENGE_ID>',
otp: '<OTP>',
result = await account.updateChallenge(
challengeId: '<CHALLENGE_ID>',
otp: '<OTP>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updateEmail(
email: 'email@example.com',
password: 'password',
User result = await account.updateEmail(
email: 'email@example.com',
password: 'password',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updateMFA(
mfa: false,
User result = await account.updateMFA(
mfa: false,
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updateMagicURLSession(
userId: '<USER_ID>',
secret: '<SECRET>',
Session result = await account.updateMagicURLSession(
userId: '<USER_ID>',
secret: '<SECRET>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updateName(
name: '<NAME>',
User result = await account.updateName(
name: '<NAME>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updatePassword(
password: '',
oldPassword: 'password', // (optional)
User result = await account.updatePassword(
password: '',
oldPassword: 'password', // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
@@ -0,0 +1,12 @@
import 'package:appwrite/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.updatePhoneSession(
userId: '<USER_ID>',
secret: '<SECRET>',
);
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updatePhoneVerification(
userId: '<USER_ID>',
secret: '<SECRET>',
Token result = await account.updatePhoneVerification(
userId: '<USER_ID>',
secret: '<SECRET>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updatePhone(
phone: '+12065550100',
password: 'password',
User result = await account.updatePhone(
phone: '+12065550100',
password: 'password',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updatePrefs(
prefs: {},
User result = await account.updatePrefs(
prefs: {},
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updatePushTarget(
targetId: '<TARGET_ID>',
identifier: '<IDENTIFIER>',
Target result = await account.updatePushTarget(
targetId: '<TARGET_ID>',
identifier: '<IDENTIFIER>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updateRecovery(
userId: '<USER_ID>',
secret: '<SECRET>',
password: '',
Token result = await account.updateRecovery(
userId: '<USER_ID>',
secret: '<SECRET>',
password: '',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updateSession(
sessionId: '<SESSION_ID>',
Session result = await account.updateSession(
sessionId: '<SESSION_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updateStatus();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
User result = await account.updateStatus();
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.updateVerification(
userId: '<USER_ID>',
secret: '<SECRET>',
Token result = await account.updateVerification(
userId: '<USER_ID>',
secret: '<SECRET>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
Future result = account.verifyAuthenticator(
type: AuthenticatorType.totp,
otp: '<OTP>',
User result = await account.verifyAuthenticator(
type: AuthenticatorType.totp,
otp: '<OTP>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+21 -25
View File
@@ -1,37 +1,33 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Avatars avatars = Avatars(client);
// Downloading file
Future result = avatars.getBrowser(
code: Browser.avantBrowser,
width: 0, // (optional)
height: 0, // (optional)
quality: 0, // (optional)
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await avatars.getBrowser(
code: Browser.avantBrowser,
width: 0, // optional
height: 0, // optional
quality: 0, // optional
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: avatars.getBrowser(
code: Browser.avantBrowser.value,
width:0 , // (optional)
height:0 , // (optional)
quality:0 , // (optional)
future: avatars.getBrowser(
code: Browser.avantBrowser,
width:0 , // optional
height:0 , // optional
quality:0 , // optional
), // 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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+21 -25
View File
@@ -1,37 +1,33 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Avatars avatars = Avatars(client);
// Downloading file
Future result = avatars.getCreditCard(
code: CreditCard.americanExpress,
width: 0, // (optional)
height: 0, // (optional)
quality: 0, // (optional)
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await avatars.getCreditCard(
code: CreditCard.americanExpress,
width: 0, // optional
height: 0, // optional
quality: 0, // optional
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: avatars.getCreditCard(
code: CreditCard.americanExpress.value,
width:0 , // (optional)
height:0 , // (optional)
quality:0 , // (optional)
future: avatars.getCreditCard(
code: CreditCard.americanExpress,
width:0 , // optional
height:0 , // optional
quality:0 , // optional
), // 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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+15 -19
View File
@@ -1,31 +1,27 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Avatars avatars = Avatars(client);
// Downloading file
Future result = avatars.getFavicon(
url: 'https://example.com',
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await avatars.getFavicon(
url: 'https://example.com',
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: avatars.getFavicon(
url:'https://example.com' ,
future: avatars.getFavicon(
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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+21 -25
View File
@@ -1,37 +1,33 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Avatars avatars = Avatars(client);
// Downloading file
Future result = avatars.getFlag(
code: Flag.afghanistan,
width: 0, // (optional)
height: 0, // (optional)
quality: 0, // (optional)
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await avatars.getFlag(
code: Flag.afghanistan,
width: 0, // optional
height: 0, // optional
quality: 0, // optional
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: avatars.getFlag(
code: Flag.afghanistan.value,
width:0 , // (optional)
height:0 , // (optional)
quality:0 , // (optional)
future: avatars.getFlag(
code: Flag.afghanistan,
width:0 , // optional
height:0 , // optional
quality:0 , // optional
), // 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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+19 -23
View File
@@ -1,35 +1,31 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Avatars avatars = Avatars(client);
// Downloading file
Future result = avatars.getImage(
url: 'https://example.com',
width: 0, // (optional)
height: 0, // (optional)
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await avatars.getImage(
url: 'https://example.com',
width: 0, // optional
height: 0, // optional
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: avatars.getImage(
url:'https://example.com' ,
width:0 , // (optional)
height:0 , // (optional)
future: avatars.getImage(
url:'https://example.com' ,
width:0 , // optional
height:0 , // optional
), // 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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+21 -25
View File
@@ -1,37 +1,33 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Avatars avatars = Avatars(client);
// Downloading file
Future result = avatars.getInitials(
name: '<NAME>', // (optional)
width: 0, // (optional)
height: 0, // (optional)
background: '', // (optional)
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await avatars.getInitials(
name: '<NAME>', // optional
width: 0, // optional
height: 0, // optional
background: '', // optional
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: avatars.getInitials(
name:'<NAME>' , // (optional)
width:0 , // (optional)
height:0 , // (optional)
background:'' , // (optional)
future: avatars.getInitials(
name:'<NAME>' , // optional
width:0 , // optional
height:0 , // optional
background:'' , // optional
), // 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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+21 -25
View File
@@ -1,37 +1,33 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Avatars avatars = Avatars(client);
// Downloading file
Future result = avatars.getQR(
text: '<TEXT>',
size: 1, // (optional)
margin: 0, // (optional)
download: false, // (optional)
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await avatars.getQR(
text: '<TEXT>',
size: 1, // optional
margin: 0, // optional
download: false, // optional
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: avatars.getQR(
text:'<TEXT>' ,
size:1 , // (optional)
margin:0 , // (optional)
download:false , // (optional)
future: avatars.getQR(
text:'<TEXT>' ,
size:1 , // optional
margin:0 , // optional
download:false , // optional
), // 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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+8 -15
View File
@@ -1,22 +1,15 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Databases databases = Databases(client);
Future result = databases.createDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
permissions: ["read("any")"], // (optional)
Document result = await databases.createDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
permissions: ["read("any")"], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Databases databases = Databases(client);
Future result = databases.deleteDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
await databases.deleteDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+7 -14
View File
@@ -1,21 +1,14 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Databases databases = Databases(client);
Future result = databases.getDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
queries: [], // (optional)
Document result = await databases.getDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
queries: [], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Databases databases = Databases(client);
Future result = databases.listDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [], // (optional)
DocumentList result = await databases.listDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+8 -15
View File
@@ -1,22 +1,15 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Databases databases = Databases(client);
Future result = databases.updateDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {}, // (optional)
permissions: ["read("any")"], // (optional)
Document result = await databases.updateDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {}, // optional
permissions: ["read("any")"], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+9 -16
View File
@@ -1,23 +1,16 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Functions functions = Functions(client);
Future result = functions.createExecution(
functionId: '<FUNCTION_ID>',
body: '<BODY>', // (optional)
xasync: false, // (optional)
path: '<PATH>', // (optional)
method: ExecutionMethod.gET, // (optional)
headers: {}, // (optional)
Execution result = await functions.createExecution(
functionId: '<FUNCTION_ID>',
body: '<BODY>', // optional
xasync: false, // optional
path: '<PATH>', // optional
method: ExecutionMethod.gET, // optional
headers: {}, // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Functions functions = Functions(client);
Future result = functions.getExecution(
functionId: '<FUNCTION_ID>',
executionId: '<EXECUTION_ID>',
Execution result = await functions.getExecution(
functionId: '<FUNCTION_ID>',
executionId: '<EXECUTION_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Functions functions = Functions(client);
Future result = functions.listExecutions(
functionId: '<FUNCTION_ID>',
queries: [], // (optional)
search: '<SEARCH>', // (optional)
ExecutionList result = await functions.listExecutions(
functionId: '<FUNCTION_ID>',
queries: [], // optional
search: '<SEARCH>', // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Graphql graphql = Graphql(client);
Future result = graphql.mutation(
query: {},
Any result = await graphql.mutation(
query: {},
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Graphql graphql = Graphql(client);
Future result = graphql.query(
query: {},
Any result = await graphql.query(
query: {},
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Locale locale = Locale(client);
Future result = locale.get();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
Locale result = await locale.get();
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Locale locale = Locale(client);
Future result = locale.listCodes();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
LocaleCodeList result = await locale.listCodes();
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Locale locale = Locale(client);
Future result = locale.listContinents();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
ContinentList result = await locale.listContinents();
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Locale locale = Locale(client);
Future result = locale.listCountriesEU();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
CountryList result = await locale.listCountriesEU();
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Locale locale = Locale(client);
Future result = locale.listCountriesPhones();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
PhoneList result = await locale.listCountriesPhones();
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Locale locale = Locale(client);
Future result = locale.listCountries();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
CountryList result = await locale.listCountries();
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Locale locale = Locale(client);
Future result = locale.listCurrencies();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
CurrencyList result = await locale.listCurrencies();
+3 -10
View File
@@ -1,16 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Locale locale = Locale(client);
Future result = locale.listLanguages();
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
LanguageList result = await locale.listLanguages();
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Messaging messaging = Messaging(client);
Future result = messaging.createSubscriber(
topicId: '<TOPIC_ID>',
subscriberId: '<SUBSCRIBER_ID>',
targetId: '<TARGET_ID>',
Subscriber result = await messaging.createSubscriber(
topicId: '<TOPIC_ID>',
subscriberId: '<SUBSCRIBER_ID>',
targetId: '<TARGET_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Messaging messaging = Messaging(client);
Future result = messaging.deleteSubscriber(
topicId: '<TOPIC_ID>',
subscriberId: '<SUBSCRIBER_ID>',
await messaging.deleteSubscriber(
topicId: '<TOPIC_ID>',
subscriberId: '<SUBSCRIBER_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+7 -14
View File
@@ -2,21 +2,14 @@ import 'dart:io';
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Storage storage = Storage(client);
Future result = storage.createFile(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'),
permissions: ["read("any")"], // (optional)
File result = await storage.createFile(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'),
permissions: ["read("any")"], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Storage storage = Storage(client);
Future result = storage.deleteFile(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
await storage.deleteFile(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+17 -21
View File
@@ -1,33 +1,29 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Storage storage = Storage(client);
// Downloading file
Future result = storage.getFileDownload(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await storage.getFileDownload(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: storage.getFileDownload(
bucketId:'<BUCKET_ID>' ,
fileId:'<FILE_ID>' ,
future: storage.getFileDownload(
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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+39 -43
View File
@@ -1,55 +1,51 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Storage storage = Storage(client);
// Downloading file
Future result = storage.getFilePreview(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
width: 0, // (optional)
height: 0, // (optional)
gravity: ImageGravity.center, // (optional)
quality: 0, // (optional)
borderWidth: 0, // (optional)
borderColor: '', // (optional)
borderRadius: 0, // (optional)
opacity: 0, // (optional)
rotation: -360, // (optional)
background: '', // (optional)
output: ImageFormat.jpg, // (optional)
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await storage.getFilePreview(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
width: 0, // optional
height: 0, // optional
gravity: ImageGravity.center, // optional
quality: 0, // optional
borderWidth: 0, // optional
borderColor: '', // optional
borderRadius: 0, // optional
opacity: 0, // optional
rotation: -360, // optional
background: '', // optional
output: ImageFormat.jpg, // optional
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: storage.getFilePreview(
bucketId:'<BUCKET_ID>' ,
fileId:'<FILE_ID>' ,
width:0 , // (optional)
height:0 , // (optional)
gravity: ImageGravity.center.value, // (optional)
quality:0 , // (optional)
borderWidth:0 , // (optional)
borderColor:'' , // (optional)
borderRadius:0 , // (optional)
opacity:0 , // (optional)
rotation:-360 , // (optional)
background:'' , // (optional)
output: ImageFormat.jpg.value, // (optional)
future: storage.getFilePreview(
bucketId:'<BUCKET_ID>' ,
fileId:'<FILE_ID>' ,
width:0 , // optional
height:0 , // optional
gravity: ImageGravity.center, // optional
quality:0 , // optional
borderWidth:0 , // optional
borderColor:'' , // optional
borderRadius:0 , // optional
opacity:0 , // optional
rotation:-360 , // optional
background:'' , // optional
output: ImageFormat.jpg, // optional
), // 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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+17 -21
View File
@@ -1,33 +1,29 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Storage storage = Storage(client);
// Downloading file
Future result = storage.getFileView(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
).then((bytes) {
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes)
}).catchError((error) {
print(error.response);
})
UInt8List bytes = await storage.getFileView(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: storage.getFileView(
bucketId:'<BUCKET_ID>' ,
fileId:'<FILE_ID>' ,
future: storage.getFileView(
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
? Image.memory(
snapshot.data,
)
: CircularProgressIndicator();
}
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Storage storage = Storage(client);
Future result = storage.getFile(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
File result = await storage.getFile(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Storage storage = Storage(client);
Future result = storage.listFiles(
bucketId: '<BUCKET_ID>',
queries: [], // (optional)
search: '<SEARCH>', // (optional)
FileList result = await storage.listFiles(
bucketId: '<BUCKET_ID>',
queries: [], // optional
search: '<SEARCH>', // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+7 -14
View File
@@ -1,21 +1,14 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Storage storage = Storage(client);
Future result = storage.updateFile(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
name: '<NAME>', // (optional)
permissions: ["read("any")"], // (optional)
File result = await storage.updateFile(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
name: '<NAME>', // optional
permissions: ["read("any")"], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+10 -17
View File
@@ -1,24 +1,17 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.createMembership(
teamId: '<TEAM_ID>',
roles: [],
email: 'email@example.com', // (optional)
userId: '<USER_ID>', // (optional)
phone: '+12065550100', // (optional)
url: 'https://example.com', // (optional)
name: '<NAME>', // (optional)
Membership result = await teams.createMembership(
teamId: '<TEAM_ID>',
roles: [],
email: 'email@example.com', // optional
userId: '<USER_ID>', // optional
phone: '+12065550100', // optional
url: 'https://example.com', // optional
name: '<NAME>', // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.create(
teamId: '<TEAM_ID>',
name: '<NAME>',
roles: [], // (optional)
Team result = await teams.create(
teamId: '<TEAM_ID>',
name: '<NAME>',
roles: [], // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.deleteMembership(
teamId: '<TEAM_ID>',
membershipId: '<MEMBERSHIP_ID>',
await teams.deleteMembership(
teamId: '<TEAM_ID>',
membershipId: '<MEMBERSHIP_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.delete(
teamId: '<TEAM_ID>',
await teams.delete(
teamId: '<TEAM_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.getMembership(
teamId: '<TEAM_ID>',
membershipId: '<MEMBERSHIP_ID>',
Membership result = await teams.getMembership(
teamId: '<TEAM_ID>',
membershipId: '<MEMBERSHIP_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.getPrefs(
teamId: '<TEAM_ID>',
Preferences result = await teams.getPrefs(
teamId: '<TEAM_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+4 -11
View File
@@ -1,18 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.get(
teamId: '<TEAM_ID>',
Team result = await teams.get(
teamId: '<TEAM_ID>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.listMemberships(
teamId: '<TEAM_ID>',
queries: [], // (optional)
search: '<SEARCH>', // (optional)
MembershipList result = await teams.listMemberships(
teamId: '<TEAM_ID>',
queries: [], // optional
search: '<SEARCH>', // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.list(
queries: [], // (optional)
search: '<SEARCH>', // (optional)
TeamList result = await teams.list(
queries: [], // optional
search: '<SEARCH>', // optional
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
@@ -1,21 +1,14 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.updateMembershipStatus(
teamId: '<TEAM_ID>',
membershipId: '<MEMBERSHIP_ID>',
userId: '<USER_ID>',
secret: '<SECRET>',
Membership result = await teams.updateMembershipStatus(
teamId: '<TEAM_ID>',
membershipId: '<MEMBERSHIP_ID>',
userId: '<USER_ID>',
secret: '<SECRET>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+6 -13
View File
@@ -1,20 +1,13 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.updateMembership(
teamId: '<TEAM_ID>',
membershipId: '<MEMBERSHIP_ID>',
roles: [],
Membership result = await teams.updateMembership(
teamId: '<TEAM_ID>',
membershipId: '<MEMBERSHIP_ID>',
roles: [],
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.updateName(
teamId: '<TEAM_ID>',
name: '<NAME>',
Team result = await teams.updateName(
teamId: '<TEAM_ID>',
name: '<NAME>',
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
+5 -12
View File
@@ -1,19 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Teams teams = Teams(client);
Future result = teams.updatePrefs(
teamId: '<TEAM_ID>',
prefs: {},
Preferences result = await teams.updatePrefs(
teamId: '<TEAM_ID>',
prefs: {},
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});