-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
The package currently ignores the server version information returned as part of the capabilities response. Upstream projects may need this information, though, to adapt their business logic and flow to the server version.
Goal
Have the Capabilities struct provide the major, minor and patch version of a server. All of those values are not optional, safe to expect and of type Int64.
Response Reference
An unauthenticated example response by the server for a capabilities request looks like this:
<ocs>
<meta>
<status>ok</status>
<statuscode>200</statuscode>
<message>OK</message>
</meta>
<data>
<version>
<major>31</major>
<minor>0</minor>
<micro>9</micro>
<string>31.0.9</string>
<edition/>
<extendedSupport/>
</version>
<capabilities>
<bruteforce>
<delay>800</delay>
<allow-listed/>
</bruteforce>
<app_api>
<version>5.0.2</version>
</app_api>
<theming>
<name>Debugging Cloud</name>
<url>http://localhost:8080</url>
<slogan>Ein Back-End für die Client-Entwicklung</slogan>
<color>#F0FDBB</color>
<color-text>#000000</color-text>
<color-element>#cff926</color-element>
<color-element-bright>#cff926</color-element-bright>
<color-element-dark>#F0FDBB</color-element-dark>
<logo>http://localhost:8080/core/img/logo/logo.svg?v=4</logo>
<background>#4CCE79</background>
<background-text>#000000</background-text>
<background-plain>1</background-plain>
<background-default>1</background-default>
<logoheader>http://localhost:8080/core/img/logo/logo.svg?v=4</logoheader>
<favicon>http://localhost:8080/core/img/logo/logo.svg?v=4</favicon>
</theming>
</capabilities>
</data>
</ocs>The ocs → data → version tag contains the major, minor and micro children. These are the properties of interest.
Reference
Documentation on the OCS API capabilities endpoint: https://docs.nextcloud.com/server/stable/developer_manual/_static/openapi.html#/operations/core-ocs-get-capabilities
Metadata
Metadata
Labels
Type
Projects
Status