Browse Source

feat(nextcloud): Add example

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/1147/head
jld3103 1 year ago
parent
commit
47df74adca
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 13
      packages/nextcloud/example/example.dart

13
packages/nextcloud/example/example.dart

@ -0,0 +1,13 @@
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/provisioning_api.dart';
Future<void> 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`
}
Loading…
Cancel
Save