Updated SDK
This commit is contained in:
parent
048b65d69e
commit
55e9babb3b
|
@ -115,6 +115,12 @@
|
|||
"packageUri": "lib/",
|
||||
"languageVersion": "1.12"
|
||||
},
|
||||
{
|
||||
"name": "package_info",
|
||||
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+16",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.0"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path-1.6.4",
|
||||
|
@ -236,7 +242,7 @@
|
|||
"languageVersion": "2.6"
|
||||
}
|
||||
],
|
||||
"generated": "2020-04-09T12:09:58.816826Z",
|
||||
"generated": "2020-04-10T08:30:47.526846Z",
|
||||
"generator": "pub",
|
||||
"generatorVersion": "2.7.2"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# This is a generated file; do not edit or check into version control.
|
||||
flutter_web_auth=/Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/flutter_web_auth-0.1.3/
|
||||
package_info=/Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+16/
|
||||
path_provider=/Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/
|
||||
path_provider_macos=/Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4/
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_web_auth","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]}]}
|
||||
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_web_auth","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]}]}
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by pub on 2020-04-09 15:09:58.798143.
|
||||
# Generated by pub on 2020-04-10 11:30:47.496978.
|
||||
archive:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/archive-2.0.11/lib/
|
||||
args:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/args-1.5.2/lib/
|
||||
async:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/async-2.4.0/lib/
|
||||
|
@ -18,6 +18,7 @@ http_parser:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/http_parse
|
|||
image:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/image-2.1.4/lib/
|
||||
matcher:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.6/lib/
|
||||
meta:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/meta-1.1.8/lib/
|
||||
package_info:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+16/lib/
|
||||
path:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/
|
||||
path_provider:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/lib/
|
||||
path_provider_macos:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4/lib/
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 0.0.11
|
||||
|
||||
- Added integration with web auth plugin to support Appwrite OAuth API
|
||||
|
||||
## 0.0.9
|
||||
|
||||
- Updated deafult params
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.createOAuth2Session(
|
||||
provider: 'bitbucket',
|
||||
success: 'https://example.com',
|
||||
failure: 'https://example.com',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.createRecovery(
|
||||
email: 'email@example.com',
|
||||
url: 'https://example.com',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
21
app/sdks/flutter-dart/doc/examples/account/create-session.md
Normal file
21
app/sdks/flutter-dart/doc/examples/account/create-session.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.createSession(
|
||||
email: 'email@example.com',
|
||||
password: 'password',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.createVerification(
|
||||
url: 'https://example.com',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
21
app/sdks/flutter-dart/doc/examples/account/create.md
Normal file
21
app/sdks/flutter-dart/doc/examples/account/create.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.create(
|
||||
email: 'email@example.com',
|
||||
password: 'password',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/account/delete-session.md
Normal file
20
app/sdks/flutter-dart/doc/examples/account/delete-session.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.deleteSession(
|
||||
sessionId: '[SESSION_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.deleteSessions();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
18
app/sdks/flutter-dart/doc/examples/account/delete.md
Normal file
18
app/sdks/flutter-dart/doc/examples/account/delete.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.delete();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
18
app/sdks/flutter-dart/doc/examples/account/get-logs.md
Normal file
18
app/sdks/flutter-dart/doc/examples/account/get-logs.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.getLogs();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
18
app/sdks/flutter-dart/doc/examples/account/get-prefs.md
Normal file
18
app/sdks/flutter-dart/doc/examples/account/get-prefs.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.getPrefs();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
18
app/sdks/flutter-dart/doc/examples/account/get-sessions.md
Normal file
18
app/sdks/flutter-dart/doc/examples/account/get-sessions.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.getSessions();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
18
app/sdks/flutter-dart/doc/examples/account/get.md
Normal file
18
app/sdks/flutter-dart/doc/examples/account/get.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.get();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
21
app/sdks/flutter-dart/doc/examples/account/update-email.md
Normal file
21
app/sdks/flutter-dart/doc/examples/account/update-email.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.updateEmail(
|
||||
email: 'email@example.com',
|
||||
password: 'password',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/account/update-name.md
Normal file
20
app/sdks/flutter-dart/doc/examples/account/update-name.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.updateName(
|
||||
name: '[NAME]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.updatePassword(
|
||||
password: 'password',
|
||||
oldPassword: 'password',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/account/update-prefs.md
Normal file
20
app/sdks/flutter-dart/doc/examples/account/update-prefs.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.updatePrefs(
|
||||
prefs: {},
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.updateRecovery(
|
||||
userId: '[USER_ID]',
|
||||
secret: '[SECRET]',
|
||||
passwordA: 'password',
|
||||
passwordB: 'password',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = account.updateVerification(
|
||||
userId: '[USER_ID]',
|
||||
secret: '[SECRET]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/avatars/get-browser.md
Normal file
20
app/sdks/flutter-dart/doc/examples/avatars/get-browser.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = avatars.getBrowser(
|
||||
code: 'aa',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = avatars.getCreditCard(
|
||||
code: 'amex',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/avatars/get-favicon.md
Normal file
20
app/sdks/flutter-dart/doc/examples/avatars/get-favicon.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = avatars.getFavicon(
|
||||
url: 'https://example.com',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/avatars/get-flag.md
Normal file
20
app/sdks/flutter-dart/doc/examples/avatars/get-flag.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = avatars.getFlag(
|
||||
code: 'af',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/avatars/get-image.md
Normal file
20
app/sdks/flutter-dart/doc/examples/avatars/get-image.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = avatars.getImage(
|
||||
url: 'https://example.com',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/avatars/get-q-r.md
Normal file
20
app/sdks/flutter-dart/doc/examples/avatars/get-q-r.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = avatars.getQR(
|
||||
text: '[TEXT]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = database.createDocument(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
data: {},
|
||||
read: [],
|
||||
write: [],
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = database.deleteDocument(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
documentId: '[DOCUMENT_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
21
app/sdks/flutter-dart/doc/examples/database/get-document.md
Normal file
21
app/sdks/flutter-dart/doc/examples/database/get-document.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = database.getDocument(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
documentId: '[DOCUMENT_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = database.listDocuments(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,24 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = database.updateDocument(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
documentId: '[DOCUMENT_ID]',
|
||||
data: {},
|
||||
read: [],
|
||||
write: [],
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
18
app/sdks/flutter-dart/doc/examples/locale/get-continents.md
Normal file
18
app/sdks/flutter-dart/doc/examples/locale/get-continents.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = locale.getContinents();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = locale.getCountriesEU();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = locale.getCountriesPhones();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
18
app/sdks/flutter-dart/doc/examples/locale/get-countries.md
Normal file
18
app/sdks/flutter-dart/doc/examples/locale/get-countries.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = locale.getCountries();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
18
app/sdks/flutter-dart/doc/examples/locale/get-currencies.md
Normal file
18
app/sdks/flutter-dart/doc/examples/locale/get-currencies.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = locale.getCurrencies();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
18
app/sdks/flutter-dart/doc/examples/locale/get.md
Normal file
18
app/sdks/flutter-dart/doc/examples/locale/get.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Locale locale = Locale(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = locale.get();
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
23
app/sdks/flutter-dart/doc/examples/storage/create-file.md
Normal file
23
app/sdks/flutter-dart/doc/examples/storage/create-file.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
//const fs = require('fs');
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = storage.createFile(
|
||||
file: null,
|
||||
read: [],
|
||||
write: [],
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/storage/delete-file.md
Normal file
20
app/sdks/flutter-dart/doc/examples/storage/delete-file.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = storage.deleteFile(
|
||||
fileId: '[FILE_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = storage.getFileDownload(
|
||||
fileId: '[FILE_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = storage.getFilePreview(
|
||||
fileId: '[FILE_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/storage/get-file-view.md
Normal file
20
app/sdks/flutter-dart/doc/examples/storage/get-file-view.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = storage.getFileView(
|
||||
fileId: '[FILE_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/storage/get-file.md
Normal file
20
app/sdks/flutter-dart/doc/examples/storage/get-file.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = storage.getFile(
|
||||
fileId: '[FILE_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
19
app/sdks/flutter-dart/doc/examples/storage/list-files.md
Normal file
19
app/sdks/flutter-dart/doc/examples/storage/list-files.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = storage.listFiles(
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
22
app/sdks/flutter-dart/doc/examples/storage/update-file.md
Normal file
22
app/sdks/flutter-dart/doc/examples/storage/update-file.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Storage storage = Storage(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = storage.updateFile(
|
||||
fileId: '[FILE_ID]',
|
||||
read: [],
|
||||
write: [],
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = teams.createMembership(
|
||||
teamId: '[TEAM_ID]',
|
||||
email: 'email@example.com',
|
||||
roles: [],
|
||||
url: 'https://example.com',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/teams/create.md
Normal file
20
app/sdks/flutter-dart/doc/examples/teams/create.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = teams.create(
|
||||
name: '[NAME]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = teams.deleteMembership(
|
||||
teamId: '[TEAM_ID]',
|
||||
inviteId: '[INVITE_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/teams/delete.md
Normal file
20
app/sdks/flutter-dart/doc/examples/teams/delete.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = teams.delete(
|
||||
teamId: '[TEAM_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/teams/get-memberships.md
Normal file
20
app/sdks/flutter-dart/doc/examples/teams/get-memberships.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = teams.getMemberships(
|
||||
teamId: '[TEAM_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
20
app/sdks/flutter-dart/doc/examples/teams/get.md
Normal file
20
app/sdks/flutter-dart/doc/examples/teams/get.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = teams.get(
|
||||
teamId: '[TEAM_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
19
app/sdks/flutter-dart/doc/examples/teams/list.md
Normal file
19
app/sdks/flutter-dart/doc/examples/teams/list.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = teams.list(
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = teams.updateMembershipStatus(
|
||||
teamId: '[TEAM_ID]',
|
||||
inviteId: '[INVITE_ID]',
|
||||
userId: '[USER_ID]',
|
||||
secret: '[SECRET]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
21
app/sdks/flutter-dart/doc/examples/teams/update.md
Normal file
21
app/sdks/flutter-dart/doc/examples/teams/update.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
// Init SDK
|
||||
Client client = Client();
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
Future result = teams.update(
|
||||
teamId: '[TEAM_ID]',
|
||||
name: '[NAME]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
|
@ -130,6 +130,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.8"
|
||||
package_info:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.0+16"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -10,6 +10,7 @@ environment:
|
|||
dependencies:
|
||||
meta: ^1.1.8
|
||||
path_provider: ^1.6.5
|
||||
package_info: ^0.4.0+16
|
||||
dio: ^3.0.0
|
||||
cookie_jar: ^1.0.0
|
||||
dio_cookie_manager: ^1.0.0
|
||||
|
|
4
composer.lock
generated
4
composer.lock
generated
|
@ -1622,7 +1622,7 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator",
|
||||
"reference": "31b451aee0a68f7247d206e949eed9a6f9e3bd72"
|
||||
"reference": "3e1012da0fec5559f0859816b4c3fecea23fe808"
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*",
|
||||
|
@ -1652,7 +1652,7 @@
|
|||
}
|
||||
],
|
||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||
"time": "2020-04-08T17:00:31+00:00"
|
||||
"time": "2020-04-10T08:25:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 0.0.11
|
||||
|
||||
- Added integration with web auth plugin to support Appwrite OAuth API
|
||||
|
||||
## 0.0.9
|
||||
|
||||
- Updated deafult params
|
||||
|
|
Loading…
Reference in a new issue