From 47df74adcaf65671716d07ab9da690bfa3454547 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Thu, 16 Nov 2023 19:01:27 +0100 Subject: [PATCH] feat(nextcloud): Add example Signed-off-by: jld3103 --- packages/nextcloud/example/example.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 packages/nextcloud/example/example.dart diff --git a/packages/nextcloud/example/example.dart b/packages/nextcloud/example/example.dart new file mode 100644 index 00000000..84a6076c --- /dev/null +++ b/packages/nextcloud/example/example.dart @@ -0,0 +1,13 @@ +import 'package:nextcloud/nextcloud.dart'; +import 'package:nextcloud/provisioning_api.dart'; + +Future main() async { + final client = NextcloudClient( + Uri.parse('http://localhost'), + loginName: 'admin', + password: 'admin', + ); + + final response = await client.provisioningApi.users.getCurrentUser(); + print(response.body.ocs.data.id); // Will print `admin` +}