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

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

nextcloud #

A Nextcloud API client written in Dart.

If you want to implement a Flutter app based on Nextcloud, checkout the Neon project which provides a framework for this use-case and also develops this package.

Usage #

Authentication #

There are multiple ways to authenticate.
First there is HTTP Basic auth which works with the normal user credentials (e-mail and other identifiers also work):

final client = NextcloudClient(
    Uri.parse('http://localhost'),
    loginName: 'admin',
    password: 'admin',
);

Secondly there is Http Bearer auth which works with app passwords:

final client = NextcloudClient(
    Uri.parse('http://localhost'),
    loginName: 'admin',
    appPassword: 'xxxxx-xxxxx-xxxxx-xxxx-xxxxx',
);

Not all endpoints work with just HTTP Basic auth, so it is advised to use app passwords obtained either directly in the Web UI by the user or using the login flow.
Some endpoints do not need any authentication at all or provide extended information when the request is optionally authenticated.

Note Flutter applications may require additional configuration to make HTTP requests.

Endpoints #

It is not guaranteed that an API request will work unless the app is installed and enabled on the server (and has a supported version).

To get an easier overview of the available endpoints you can browse the server OpenAPI documentation, but be aware that the package might not be in sync with it.
Alternatively you can also go to https://pub.dev/documentation/nextcloud/latest.

The endpoints are grouped by app and most apps also group their endpoints again. They can be accessed using getters on the NextcloudClient.

For an example checkout the example.

Compatibility/Support policy #

Component Supported versions (1)
Server (2) 28 - 30
Cookbook app 0.11
User account deletion app 2.4 - 2.6
News app 25
Notes app 4.8 - 4.11
Notifications app 28 - 30
Talk app 18 - 20
Tables app 0.6 - 0.8
NextPush app 1.4 - 1.5

1: Other versions might be supported too or at least mostly working, but we do not test against those.
2: Server includes the following apps: comments, core, dashboard, dav, files, files_external, files_reminders, files_sharing, files_trashbin, files_versions, provisioning_api, settings, sharebymail, systemtags, theming, updatenotification, user_ldap, user_status, weather_status, webhook_listeners and WebDAV.

We aim to support all currently maintained server versions and all app versions that support those server versions. The currently maintained server versions can be found here: https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule Once a server version becomes EOL the support for it will be removed.

To ensure this package is compatible with the supported server versions we run API unit tests. Since we do not cover all endpoints we can not claim compatibility for endpoints we do not test against. Even if there are unit tests for an endpoint we can not guarantee that it will work fine in every scenario.

Please report any compatibility problems (if you are using a compatible server version) and feel free to add unit tests for endpoints you depend on. This will increase our test coverage and enables everyone to work more confidently with the endpoints.

24
likes
130
pub points
87%
popularity

Publisher

unverified uploader

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

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#nextcloud #openapi #webdav

Documentation

API reference

License

AGPL-3.0 (license)

Dependencies

built_collection, built_value, collection, crypto, crypton, dynamite_runtime, http, logging, meta, string_scanner, timezone, universal_io, uri, version, xml, xml_annotation

More

Packages that depend on nextcloud