1
0
Fork 0
mirror of synced 2024-07-08 07:55:48 +12:00
appwrite/tests/resources/functions/dart/main.dart

26 lines
975 B
Dart
Raw Normal View History

2021-01-26 02:47:42 +13:00
import "dart:io";
import "package:dart_appwrite/dart_appwrite.dart";
2021-01-21 22:38:24 +13:00
void main() { // Init SDK
Client client = Client();
client
2021-01-26 02:47:42 +13:00
.setEndpoint(Platform.environment["APPWRITE_ENDPOINT"]) // Your API Endpoint
.setProject(Platform.environment["APPWRITE_PROJECT"]) // Your project ID
.setKey(Platform.environment["APPWRITE_SECRET"]) // Your secret API key
2021-01-21 22:38:24 +13:00
;
Storage storage = Storage(client);
//Future result = storage.getFile(fileId: '[FILE_ID]');
2021-01-26 02:47:42 +13:00
print(Platform.environment["APPWRITE_FUNCTION_ID"]);
print(Platform.environment["APPWRITE_FUNCTION_NAME"]);
print(Platform.environment["APPWRITE_FUNCTION_TAG"]);
print(Platform.environment["APPWRITE_FUNCTION_TRIGGER"]);
print(Platform.environment["APPWRITE_FUNCTION_ENV_NAME"]);
print(Platform.environment["APPWRITE_FUNCTION_ENV_VERSION"]);
2021-01-21 22:38:24 +13:00
// print(result['$id']);
2021-01-26 02:47:42 +13:00
print(Platform.environment["APPWRITE_FUNCTION_EVENT"]);
print(Platform.environment["APPWRITE_FUNCTION_EVENT_PAYLOAD"]);
2021-01-21 22:38:24 +13:00
}