Find all related resources linked to the current displayed item.
Related resources and displayed item can come from multiple providers:
Based on the currently displayed item from one of the available providers, the app:
$ make
The app will be available in build/artifacts/
The front-end will use this endpoint to get related resources for an item:
providerId
can be files
, deck
, talk
, calendar
itemId
will be the unique Id to the current displayed itemcurl "https://cloud.example.net/ocs/v2.php/apps/related_resources/related/<providerId>/<itemId>?format=json" -u 'user:password' -H "OCS-ApiRequest: true" -H "Accept: application/json"
A. OCC command is available to get related resources from the terminal. The command will returns 2 tables displaying:
$ ./occ related:test <userId> <providerId> <itemId>
+---------------------------------+-----------+----------+--------+
| Single Id | User Type | User Id | Source |
+---------------------------------+-----------+----------+--------+
| D2k2QudMQcwRl6s6Jv5XOviWGGmPnhQ | 16 | Test 001 | 16 |
| PSAM2DI1GwmyDydJSKdQxsaGPaNlVDD | 1 | test4 | 1 |
| v3RpXpyExROScJAEZvJLyHRt7Jsfk9J | 1 | test5 | 1 |
| IJCtfbJgIIMP96spf77lHPvLbWu6MZu | 1 | test6 | 1 |
+---------------------------------+-----------+----------+--------+
+-------------+---------+----------------+-------------+-------+-------------------------------------------------+
| Provider Id | Item Id | Title | Description | Score | Link |
+-------------+---------+----------------+-------------+-------+-------------------------------------------------+
| files | 207 | /Test 001 | Files | 3.528 | /index.php/f/207 |
| files | 16 | /Templates | Files | 1.1 | /index.php/f/16 |
| deck | 3 | ouila | Deck board | 1 | http://nc24.local/index.php/apps/deck/#/board/3 |
| talk | ad3jjo1 | Test Convo 001 | Talk Room | 1 | http://nc24.local/index.php/call/amn2iar4 |
+-------------+---------+----------------+-------------+-------+-------------------------------------------------+
./occ config:app:set related_resources result_max --value 7