Skip to content

christophhagen/NextcloudStatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NextcloudStatus

This Swift package contains the data model for the status data returned by a nextcloud instance, and a client to request this status for specific servers.

Setup

The Nextcloud server must have the serverinfo app installed. This app is part of the standard Nextcloud package and can be found in the directory nextcloud/apps/serverinfo.

An appropriate API token must be configured to access the status data.

For nextcloud-snap, this can be achieved with the following command:

occ config:app:set serverinfo token --value <token>

Usage

Create a client for one Nextcloud instance:

import NextcloudStatus

let client = NextcloudStatusClient(
    url: URL(string: "https://nextcloud.example.com")!,
    token: "mySecret")
    
let status = try await client.status()
print(status.data.nextcloud.system.version)

About

A client to get server info of a nextcloud instance

Resources

License

Stars

Watchers

Forks

Contributors

Languages