Add object for model and core module

This commit is contained in:
dab246
2021-08-18 17:43:22 +07:00
committed by Dat H. Pham
parent 063fd73fb0
commit 6b31252e7a
22 changed files with 306 additions and 26 deletions
@@ -0,0 +1,16 @@
import 'package:jmap_dart_client/jmap/core/session/session.dart';
import 'package:uri/uri.dart';
extension SessionExtension on Session {
String getDownloadUrl(String accountId, String blobId, String name, String type) {
final downloadUriTemplate = UriTemplate('${downloadUrl.origin}');
return downloadUriTemplate.expand({
'accountId' : '$accountId',
'blobId' : '$blobId',
'name' : '$name',
'type' : '$type',
});
}
}