nextcloud/apps
Arthur Schiwon 6bff6a5667
PoC: SystemTags endpoint to return tags used by a user with meta data
Target case is photos app: when visiting the tags category, all systemtags
of the whole cloud are retrieved. In subequent steps the next tag is
requested until the browser view is filled with tag tiles (i.e. previews
are requested just as well).

With this approach, we incorpoate the dav search and look for user related
tags that are used by them, and already returns the statistics (number of
files tagged with the respective tag) as well as a file id for the purpose
to load the preview. This defaults to the file with the highest id.

Call:
curl -s -u 'user:password' \
  'https://my.nc.srv/remote.php/dav/systemtags-current' \
  -X PROPFIND -H 'Accept: text/plain' \
  -H 'Accept-Language: en-US,en;q=0.5'  -H 'Depth: 1' \
  -H 'Content-Type: text/plain;charset=UTF-8' \
  --data @/home/doe/request-systemtag-props.xml

With request-systemtag-props.xml:
<?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:">
        <d:prop xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
                <oc:id/>
                <oc:display-name/>
                <oc:user-visible/>
                <oc:user-assignable/>
                <oc:can-assign/>
                <nc:files-assigned/>
                <nc:reference-fileid/>
        </d:prop>
</d:propfind>

Example output:
  …
  <d:response>
    <d:href>/master/remote.php/dav/systemtags/84</d:href>
    <d:propstat>
      <d:prop>
        <oc:id>84</oc:id>
        <oc:display-name>Computer</oc:display-name>
        <oc:user-visible>true</oc:user-visible>
        <oc:user-assignable>true</oc:user-assignable>
        <oc:can-assign>true</oc:can-assign>
        <nc:files-assigned>42</nc:files-assigned>
        <nc:reference-fileid>924022</nc:reference-fileid>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/systemtags/97</d:href>
    <d:propstat>
      <d:prop>
        <oc:id>97</oc:id>
        <oc:display-name>Bear</oc:display-name>
        <oc:user-visible>true</oc:user-visible>
        <oc:user-assignable>true</oc:user-assignable>
        <oc:can-assign>true</oc:can-assign>
        <nc:files-assigned>1</nc:files-assigned>
        <nc:reference-fileid>923422</nc:reference-fileid>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  …

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-05-09 23:51:48 +02:00
..
admin_audit Fix(l10n): Update translations from Transifex 2023-05-07 02:28:17 +00:00
cloud_federation_api Fix(l10n): Update translations from Transifex 2023-05-05 02:28:12 +00:00
comments fix(assets): Optimize SVGs with scour 0.38.2 2023-04-24 08:59:38 +02:00
contactsinteraction chore(autoloader): Update autoloaders with composer 2.5.5 2023-04-21 15:53:55 +02:00
dashboard Fix(l10n): Update translations from Transifex 2023-05-09 02:19:48 +00:00
dav PoC: SystemTags endpoint to return tags used by a user with meta data 2023-05-09 23:51:48 +02:00
encryption Fix(l10n): Update translations from Transifex 2023-04-26 02:28:10 +00:00
federatedfilesharing fix(assets): Optimize SVGs with scour 0.38.2 2023-04-24 08:59:38 +02:00
federation fix(federation): Log address book sync exceptions 2023-05-04 18:21:39 +02:00
files Fix(l10n): Update translations from Transifex 2023-05-09 02:19:48 +00:00
files_external Fix(l10n): Update translations from Transifex 2023-05-09 02:19:48 +00:00
files_sharing Fix(l10n): Update translations from Transifex 2023-05-09 02:19:48 +00:00
files_trashbin Fix(l10n): Update translations from Transifex 2023-05-09 02:19:48 +00:00
files_versions Fix(l10n): Update translations from Transifex 2023-05-05 02:28:12 +00:00
lookup_server_connector chore(autoloader): Update autoloaders with composer 2.5.5 2023-04-21 15:53:55 +02:00
oauth2 chore(autoloader): Update autoloaders with composer 2.5.5 2023-04-21 15:53:55 +02:00
provisioning_api fix(provisioning_api): Don't allow to configure the same additional email multiple times 2023-04-26 08:41:37 +02:00
settings Fix(l10n): Update translations from Transifex 2023-05-06 02:27:44 +00:00
sharebymail fix(assets): Optimize SVGs with scour 0.38.2 2023-04-24 08:59:38 +02:00
systemtags Fix(l10n): Update translations from Transifex 2023-05-09 02:19:48 +00:00
testing fix(assets): Optimize SVGs with scour 0.38.2 2023-04-24 08:59:38 +02:00
theming Merge pull request #38063 from nextcloud/fix/theming 2023-05-05 13:57:55 +02:00
twofactor_backupcodes chore(autoloader): Update autoloaders with composer 2.5.5 2023-04-21 15:53:55 +02:00
updatenotification Fix(l10n): Update translations from Transifex 2023-05-09 02:19:48 +00:00
user_ldap Fix(l10n): Update translations from Transifex 2023-05-04 02:28:08 +00:00
user_status Merge pull request #38099 from nextcloud/fix/missing-clear-status-route 2023-05-09 08:24:01 +02:00
weather_status Fix(l10n): Update translations from Transifex 2023-05-06 02:27:44 +00:00
workflowengine Fix(l10n): Update translations from Transifex 2023-05-07 02:28:17 +00:00