mirror of
https://github.com/appwrite/sdk-for-flutter.git
synced 2026-04-07 19:27:41 +00:00
Release candidate 4 for 1.5.x
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.addAuthenticator(
|
||||
type: AuthenticatorType.totp.value,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.addAuthenticator(
|
||||
type: AuthenticatorType.totp,
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createAnonymousSession();
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createAnonymousSession();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createEmailPasswordSession(
|
||||
email:'email@example.com' ,
|
||||
password:'password' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createEmailPasswordSession(
|
||||
email: 'email@example.com',
|
||||
password: 'password',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createEmailToken(
|
||||
userId:'[USER_ID]' ,
|
||||
email:'email@example.com' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createEmailToken(
|
||||
userId: '[USER_ID]',
|
||||
email: 'email@example.com',
|
||||
phrase: false, // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createJWT();
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createJWT();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createMagicURLToken(
|
||||
userId:'[USER_ID]' ,
|
||||
email:'email@example.com' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = 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);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createOAuth2Session(
|
||||
provider: OAuthProvider.amazon.value,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createOAuth2Session(
|
||||
provider: OAuthProvider.amazon,
|
||||
success: 'https://example.com', // (optional)
|
||||
failure: 'https://example.com', // (optional)
|
||||
token: false, // (optional)
|
||||
scopes: [], // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createPhoneToken(
|
||||
userId:'[USER_ID]' ,
|
||||
phone:'+12065550100' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createPhoneToken(
|
||||
userId: '[USER_ID]',
|
||||
phone: '+12065550100',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createPhoneVerification();
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createPhoneVerification();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createPushTarget(
|
||||
targetId:'[TARGET_ID]' ,
|
||||
identifier:'[IDENTIFIER]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createPushTarget(
|
||||
targetId: '[TARGET_ID]',
|
||||
identifier: '[IDENTIFIER]',
|
||||
providerId: '[PROVIDER_ID]', // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createRecovery(
|
||||
email:'email@example.com' ,
|
||||
url:'https://example.com' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createRecovery(
|
||||
email: 'email@example.com',
|
||||
url: 'https://example.com',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createSession(
|
||||
userId:'[USER_ID]' ,
|
||||
secret:'[SECRET]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createSession(
|
||||
userId: '[USER_ID]',
|
||||
secret: '[SECRET]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.createVerification(
|
||||
url:'https://example.com' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.createVerification(
|
||||
url: 'https://example.com',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.create(
|
||||
userId:'[USER_ID]' ,
|
||||
email:'email@example.com' ,
|
||||
password:'' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.create(
|
||||
userId: '[USER_ID]',
|
||||
email: 'email@example.com',
|
||||
password: '',
|
||||
name: '[NAME]', // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.create2FAChallenge(
|
||||
factor: AuthenticationFactor.totp.value,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.create2FAChallenge(
|
||||
factor: AuthenticationFactor.totp,
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.deleteAuthenticator(
|
||||
type: AuthenticatorType.totp.value,
|
||||
otp:'[OTP]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.deleteAuthenticator(
|
||||
type: AuthenticatorType.totp,
|
||||
otp: '[OTP]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.deleteIdentity(
|
||||
identityId:'[IDENTITY_ID]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.deleteIdentity(
|
||||
identityId: '[IDENTITY_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.deletePushTarget(
|
||||
targetId:'[TARGET_ID]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.deletePushTarget(
|
||||
targetId: '[TARGET_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.deleteSession(
|
||||
sessionId:'[SESSION_ID]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.deleteSession(
|
||||
sessionId: '[SESSION_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.deleteSessions();
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.deleteSessions();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.getPrefs();
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.getPrefs();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.getSession(
|
||||
sessionId:'[SESSION_ID]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.getSession(
|
||||
sessionId: '[SESSION_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.get();
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.get();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.listFactors();
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.listFactors();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.listIdentities(
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.listIdentities(
|
||||
queries: [], // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.listLogs(
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.listLogs(
|
||||
queries: [], // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.listSessions();
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.listSessions();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updateChallenge(
|
||||
challengeId:'[CHALLENGE_ID]' ,
|
||||
otp:'[OTP]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updateChallenge(
|
||||
challengeId: '[CHALLENGE_ID]',
|
||||
otp: '[OTP]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updateEmail(
|
||||
email:'email@example.com' ,
|
||||
password:'password' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updateEmail(
|
||||
email: 'email@example.com',
|
||||
password: 'password',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updateMFA(
|
||||
mfa:false ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updateMFA(
|
||||
mfa: false,
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updateMagicURLSession(
|
||||
userId:'[USER_ID]' ,
|
||||
secret:'[SECRET]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updateMagicURLSession(
|
||||
userId: '[USER_ID]',
|
||||
secret: '[SECRET]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updateName(
|
||||
name:'[NAME]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updateName(
|
||||
name: '[NAME]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updatePassword(
|
||||
password:'' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updatePassword(
|
||||
password: '',
|
||||
oldPassword: 'password', // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updatePhoneVerification(
|
||||
userId:'[USER_ID]' ,
|
||||
secret:'[SECRET]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updatePhoneVerification(
|
||||
userId: '[USER_ID]',
|
||||
secret: '[SECRET]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updatePhone(
|
||||
phone:'+12065550100' ,
|
||||
password:'password' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updatePhone(
|
||||
phone: '+12065550100',
|
||||
password: 'password',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updatePrefs(
|
||||
prefs:{} ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updatePrefs(
|
||||
prefs: {},
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updatePushTarget(
|
||||
targetId:'[TARGET_ID]' ,
|
||||
identifier:'[IDENTIFIER]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updatePushTarget(
|
||||
targetId: '[TARGET_ID]',
|
||||
identifier: '[IDENTIFIER]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updateRecovery(
|
||||
userId:'[USER_ID]' ,
|
||||
secret:'[SECRET]' ,
|
||||
password:'' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updateRecovery(
|
||||
userId: '[USER_ID]',
|
||||
secret: '[SECRET]',
|
||||
password: '',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updateSession(
|
||||
sessionId:'[SESSION_ID]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updateSession(
|
||||
sessionId: '[SESSION_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updateStatus();
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updateStatus();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.updateVerification(
|
||||
userId:'[USER_ID]' ,
|
||||
secret:'[SECRET]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.updateVerification(
|
||||
userId: '[USER_ID]',
|
||||
secret: '[SECRET]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = account.verifyAuthenticator(
|
||||
type: AuthenticatorType.totp.value,
|
||||
otp:'[OTP]' ,
|
||||
);
|
||||
Account account = Account(client);
|
||||
|
||||
Future result = account.verifyAuthenticator(
|
||||
type: AuthenticatorType.totp,
|
||||
otp: '[OTP]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,34 +1,37 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// downloading file
|
||||
Future result = avatars.getBrowser(
|
||||
code: Browser.avantBrowser.value,
|
||||
).then((bytes) {
|
||||
final file = File('path_to_file/filename.ext');
|
||||
file.writeAsBytesSync(bytes)
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
})
|
||||
}
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
future: avatars.getBrowser(
|
||||
code: Browser.avantBrowser.value,
|
||||
), //works for both public file and private file, for private files you need to be logged in
|
||||
code: Browser.avantBrowser.value,
|
||||
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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,34 +1,37 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// downloading file
|
||||
Future result = avatars.getCreditCard(
|
||||
code: CreditCard.americanExpress.value,
|
||||
).then((bytes) {
|
||||
final file = File('path_to_file/filename.ext');
|
||||
file.writeAsBytesSync(bytes)
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
})
|
||||
}
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
future: avatars.getCreditCard(
|
||||
code: CreditCard.americanExpress.value,
|
||||
), //works for both public file and private file, for private files you need to be logged in
|
||||
code: CreditCard.americanExpress.value,
|
||||
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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,34 +1,31 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// 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);
|
||||
})
|
||||
}
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
future: avatars.getFavicon(
|
||||
url:'https://example.com' ,
|
||||
), //works for both public file and private file, for private files you need to be logged in
|
||||
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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,34 +1,37 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// downloading file
|
||||
Future result = avatars.getFlag(
|
||||
code: Flag.afghanistan.value,
|
||||
).then((bytes) {
|
||||
final file = File('path_to_file/filename.ext');
|
||||
file.writeAsBytesSync(bytes)
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
})
|
||||
}
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
future: avatars.getFlag(
|
||||
code: Flag.afghanistan.value,
|
||||
), //works for both public file and private file, for private files you need to be logged in
|
||||
code: Flag.afghanistan.value,
|
||||
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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,34 +1,35 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// downloading file
|
||||
Future result = avatars.getImage(
|
||||
url:'https://example.com' ,
|
||||
).then((bytes) {
|
||||
final file = File('path_to_file/filename.ext');
|
||||
file.writeAsBytesSync(bytes)
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
})
|
||||
}
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
future: avatars.getImage(
|
||||
url:'https://example.com' ,
|
||||
), //works for both public file and private file, for private files you need to be logged in
|
||||
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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,32 +1,37 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// downloading file
|
||||
Future result = avatars.getInitials(
|
||||
).then((bytes) {
|
||||
final file = File('path_to_file/filename.ext');
|
||||
file.writeAsBytesSync(bytes)
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
})
|
||||
}
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
future: avatars.getInitials(
|
||||
), //works for both public file and private file, for private files you need to be logged in
|
||||
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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,34 +1,37 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// downloading file
|
||||
Future result = avatars.getQR(
|
||||
text:'[TEXT]' ,
|
||||
).then((bytes) {
|
||||
final file = File('path_to_file/filename.ext');
|
||||
file.writeAsBytesSync(bytes)
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
})
|
||||
}
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
future: avatars.getQR(
|
||||
text:'[TEXT]' ,
|
||||
), //works for both public file and private file, for private files you need to be logged in
|
||||
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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Databases databases = Databases(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = databases.createDocument(
|
||||
databaseId:'[DATABASE_ID]' ,
|
||||
collectionId:'[COLLECTION_ID]' ,
|
||||
documentId:'[DOCUMENT_ID]' ,
|
||||
data:{} ,
|
||||
);
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Future result = 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);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Databases databases = Databases(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = databases.deleteDocument(
|
||||
databaseId:'[DATABASE_ID]' ,
|
||||
collectionId:'[COLLECTION_ID]' ,
|
||||
documentId:'[DOCUMENT_ID]' ,
|
||||
);
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Future result = databases.deleteDocument(
|
||||
databaseId: '[DATABASE_ID]',
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
documentId: '[DOCUMENT_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Databases databases = Databases(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = databases.getDocument(
|
||||
databaseId:'[DATABASE_ID]' ,
|
||||
collectionId:'[COLLECTION_ID]' ,
|
||||
documentId:'[DOCUMENT_ID]' ,
|
||||
);
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Future result = databases.getDocument(
|
||||
databaseId: '[DATABASE_ID]',
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
documentId: '[DOCUMENT_ID]',
|
||||
queries: [], // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Databases databases = Databases(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = databases.listDocuments(
|
||||
databaseId:'[DATABASE_ID]' ,
|
||||
collectionId:'[COLLECTION_ID]' ,
|
||||
);
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Future result = databases.listDocuments(
|
||||
databaseId: '[DATABASE_ID]',
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
queries: [], // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Databases databases = Databases(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = databases.updateDocument(
|
||||
databaseId:'[DATABASE_ID]' ,
|
||||
collectionId:'[COLLECTION_ID]' ,
|
||||
documentId:'[DOCUMENT_ID]' ,
|
||||
);
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Future result = 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);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Functions functions = Functions(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = functions.createExecution(
|
||||
functionId:'[FUNCTION_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)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Functions functions = Functions(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = functions.getExecution(
|
||||
functionId:'[FUNCTION_ID]' ,
|
||||
executionId:'[EXECUTION_ID]' ,
|
||||
);
|
||||
Functions functions = Functions(client);
|
||||
|
||||
Future result = functions.getExecution(
|
||||
functionId: '[FUNCTION_ID]',
|
||||
executionId: '[EXECUTION_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Functions functions = Functions(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = functions.listExecutions(
|
||||
functionId:'[FUNCTION_ID]' ,
|
||||
);
|
||||
Functions functions = Functions(client);
|
||||
|
||||
Future result = functions.listExecutions(
|
||||
functionId: '[FUNCTION_ID]',
|
||||
queries: [], // (optional)
|
||||
search: '[SEARCH]', // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Graphql graphql = Graphql(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = graphql.mutation(
|
||||
query:{} ,
|
||||
);
|
||||
Graphql graphql = Graphql(client);
|
||||
|
||||
Future result = graphql.mutation(
|
||||
query: {},
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Graphql graphql = Graphql(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = graphql.query(
|
||||
query:{} ,
|
||||
);
|
||||
Graphql graphql = Graphql(client);
|
||||
|
||||
Future result = graphql.query(
|
||||
query: {},
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
+12
-15
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = locale.get();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
Future result = locale.get();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = locale.listCodes();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
Future result = locale.listCodes();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = locale.listContinents();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
Future result = locale.listContinents();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = locale.listCountriesEU();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
Future result = locale.listCountriesEU();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = locale.listCountriesPhones();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
Future result = locale.listCountriesPhones();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = locale.listCountries();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
Future result = locale.listCountries();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = locale.listCurrencies();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
Future result = locale.listCurrencies();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = locale.listLanguages();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
Future result = locale.listLanguages();
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Messaging messaging = Messaging(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = messaging.createSubscriber(
|
||||
topicId:'[TOPIC_ID]' ,
|
||||
subscriberId:'[SUBSCRIBER_ID]' ,
|
||||
targetId:'[TARGET_ID]' ,
|
||||
);
|
||||
Messaging messaging = Messaging(client);
|
||||
|
||||
Future result = messaging.createSubscriber(
|
||||
topicId: '[TOPIC_ID]',
|
||||
subscriberId: '[SUBSCRIBER_ID]',
|
||||
targetId: '[TARGET_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Messaging messaging = Messaging(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = messaging.deleteSubscriber(
|
||||
topicId:'[TOPIC_ID]' ,
|
||||
subscriberId:'[SUBSCRIBER_ID]' ,
|
||||
);
|
||||
Messaging messaging = Messaging(client);
|
||||
|
||||
Future result = messaging.deleteSubscriber(
|
||||
topicId: '[TOPIC_ID]',
|
||||
subscriberId: '[SUBSCRIBER_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
import 'dart:io';
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = storage.createFile(
|
||||
bucketId:'[BUCKET_ID]' ,
|
||||
fileId:'[FILE_ID]' ,
|
||||
file:InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg') ,
|
||||
);
|
||||
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)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = storage.deleteFile(
|
||||
bucketId:'[BUCKET_ID]' ,
|
||||
fileId:'[FILE_ID]' ,
|
||||
);
|
||||
Storage storage = Storage(client);
|
||||
|
||||
Future result = storage.deleteFile(
|
||||
bucketId: '[BUCKET_ID]',
|
||||
fileId: '[FILE_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,36 +1,33 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// 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);
|
||||
})
|
||||
}
|
||||
Storage storage = Storage(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
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
|
||||
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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,36 +1,55 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// downloading file
|
||||
Future result = storage.getFilePreview(
|
||||
bucketId:'[BUCKET_ID]' ,
|
||||
fileId:'[FILE_ID]' ,
|
||||
).then((bytes) {
|
||||
final file = File('path_to_file/filename.ext');
|
||||
file.writeAsBytesSync(bytes)
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
})
|
||||
}
|
||||
Storage storage = Storage(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
future: storage.getFilePreview(
|
||||
bucketId:'[BUCKET_ID]' ,
|
||||
fileId:'[FILE_ID]' ,
|
||||
), //works for both public file and private file, for private files you need to be logged in
|
||||
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)
|
||||
), // 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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,36 +1,33 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
// 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);
|
||||
})
|
||||
}
|
||||
Storage storage = Storage(client);
|
||||
|
||||
//displaying image preview
|
||||
// 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);
|
||||
})
|
||||
|
||||
// Displaying image preview
|
||||
FutureBuilder(
|
||||
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
|
||||
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();
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = storage.getFile(
|
||||
bucketId:'[BUCKET_ID]' ,
|
||||
fileId:'[FILE_ID]' ,
|
||||
);
|
||||
Storage storage = Storage(client);
|
||||
|
||||
Future result = storage.getFile(
|
||||
bucketId: '[BUCKET_ID]',
|
||||
fileId: '[FILE_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = storage.listFiles(
|
||||
bucketId:'[BUCKET_ID]' ,
|
||||
);
|
||||
Storage storage = Storage(client);
|
||||
|
||||
Future result = storage.listFiles(
|
||||
bucketId: '[BUCKET_ID]',
|
||||
queries: [], // (optional)
|
||||
search: '[SEARCH]', // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = storage.updateFile(
|
||||
bucketId:'[BUCKET_ID]' ,
|
||||
fileId:'[FILE_ID]' ,
|
||||
);
|
||||
Storage storage = Storage(client);
|
||||
|
||||
Future result = 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);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.createMembership(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
roles:[] ,
|
||||
);
|
||||
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)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.create(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
name:'[NAME]' ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.create(
|
||||
teamId: '[TEAM_ID]',
|
||||
name: '[NAME]',
|
||||
roles: [], // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.deleteMembership(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
membershipId:'[MEMBERSHIP_ID]' ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.deleteMembership(
|
||||
teamId: '[TEAM_ID]',
|
||||
membershipId: '[MEMBERSHIP_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.delete(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.delete(
|
||||
teamId: '[TEAM_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.getMembership(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
membershipId:'[MEMBERSHIP_ID]' ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.getMembership(
|
||||
teamId: '[TEAM_ID]',
|
||||
membershipId: '[MEMBERSHIP_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.getPrefs(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.getPrefs(
|
||||
teamId: '[TEAM_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
+14
-17
@@ -1,21 +1,18 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.get(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.get(
|
||||
teamId: '[TEAM_ID]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.listMemberships(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.listMemberships(
|
||||
teamId: '[TEAM_ID]',
|
||||
queries: [], // (optional)
|
||||
search: '[SEARCH]', // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
+15
-16
@@ -1,20 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.list(
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.list(
|
||||
queries: [], // (optional)
|
||||
search: '[SEARCH]', // (optional)
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,24 +1,21 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.updateMembershipStatus(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
membershipId:'[MEMBERSHIP_ID]' ,
|
||||
userId:'[USER_ID]' ,
|
||||
secret:'[SECRET]' ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.updateMembershipStatus(
|
||||
teamId: '[TEAM_ID]',
|
||||
membershipId: '[MEMBERSHIP_ID]',
|
||||
userId: '[USER_ID]',
|
||||
secret: '[SECRET]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.updateMembership(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
membershipId:'[MEMBERSHIP_ID]' ,
|
||||
roles:[] ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.updateMembership(
|
||||
teamId: '[TEAM_ID]',
|
||||
membershipId: '[MEMBERSHIP_ID]',
|
||||
roles: [],
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.updateName(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
name:'[NAME]' ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.updateName(
|
||||
teamId: '[TEAM_ID]',
|
||||
name: '[NAME]',
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2'); // Your project ID
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = teams.updatePrefs(
|
||||
teamId:'[TEAM_ID]' ,
|
||||
prefs:{} ,
|
||||
);
|
||||
Teams teams = Teams(client);
|
||||
|
||||
Future result = teams.updatePrefs(
|
||||
teamId: '[TEAM_ID]',
|
||||
prefs: {},
|
||||
);
|
||||
|
||||
result.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user