You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
376 B
14 lines
376 B
1 year ago
|
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`
|
||
|
}
|