nextcloud 6.1.0 copy "nextcloud: ^6.1.0" to clipboard
nextcloud: ^6.1.0 copied to clipboard

A Nextcloud API client written in Dart supporting all maintained Nextcloud server versions.

example/example.dart

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`
}