1
0
Fork 0
mirror of synced 2024-05-19 20:22:33 +12:00
This commit is contained in:
Torsten Dittmann 2021-01-25 14:47:42 +01:00
parent 85f123a98a
commit fa0ace8c08
3 changed files with 15 additions and 13 deletions

View file

@ -1,26 +1,26 @@
import 'dart:io';
import 'package:dart_appwrite/dart_appwrite.dart';
import "dart:io";
import "package:dart_appwrite/dart_appwrite.dart";
void main() { // Init SDK
Client client = Client();
client
.setEndpoint(process.env.APPWRITE_ENDPOINT) // Your API Endpoint
.setProject(process.env.APPWRITE_PROJECT) // Your project ID
.setKey(process.env.APPWRITE_SECRET) // Your secret API key
.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
;
Storage storage = Storage(client);
//Future result = storage.getFile(fileId: '[FILE_ID]');
print(process.env.APPWRITE_FUNCTION_ID);
print(process.env.APPWRITE_FUNCTION_NAME);
print(process.env.APPWRITE_FUNCTION_TAG);
print(process.env.APPWRITE_FUNCTION_TRIGGER);
print(process.env.APPWRITE_FUNCTION_ENV_NAME);
print(process.env.APPWRITE_FUNCTION_ENV_VERSION);
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"]);
// print(result['$id']);
print(process.env.APPWRITE_FUNCTION_EVENT);
print(process.env.APPWRITE_FUNCTION_EVENT_PAYLOAD);
print(Platform.environment["APPWRITE_FUNCTION_EVENT"]);
print(Platform.environment["APPWRITE_FUNCTION_EVENT_PAYLOAD"]);
}

View file

@ -3,7 +3,9 @@ echo 'Dart Packaging...'
cp -r $(pwd)/tests/resources/functions/dart $(pwd)/tests/resources/functions/packages/dart
docker run --rm -v $(pwd)/tests/resources/functions/packages/dart:/app -w /app appwrite/env-dart-2.10:1.0.0 ls
docker run --rm -v $(pwd)/tests/resources/functions/packages/dart:/app -w /app --env PUB_CACHE=./.appwrite appwrite/env-dart-2.10:1.0.0 pub get
docker run --rm -v $(pwd)/tests/resources/functions/packages/dart:/app -w /app --env PUB_CACHE=./.appwrite appwrite/env-dart-2.10:1.0.0 pub get --offline
docker run --rm -v $(pwd)/tests/resources/functions/packages/dart:/app -w /app appwrite/env-dart-2.10:1.0.0 tar -zcvf code.tar.gz .