| 14 | use OCP\IURLGenerator; |
| 15 | |
| 16 | class Capabilities implements ICapability { |
| 17 | |
| 18 | public function __construct( |
| 19 | private IL10N $l10n, |
| 20 | private IURLGenerator $urlGenerator,) { |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Expose the endpoint to create a report from a csv file |
| 25 | */ |
| 26 | public function getCapabilities() { |
| 27 | return [ |
| 28 | 'client_integration' => [ |
| 29 | Application::APP_ID => [ |
| 30 | 'version' => 0.1, |
| 31 | 'context-menu' => [ |
| 32 | [ |
| 33 | 'name' => $this->l10n->t('Visualize data in Analytics'), |
| 34 | 'url' => '/ocs/v2.php/apps/analytics/createFromDataFile', |
| 35 | 'method' => 'POST', |
| 36 | 'mimetype_filters' => 'text/csv', |
| 37 | 'params' => ['fileId' => '{fileId}'], |
| 38 | 'icon' => $this->urlGenerator->imagePath('analytics', 'app-integration.svg'), |
| 39 | ], |
| 40 | ], |
| 41 | ], |
| 42 | ], |
| 43 | ]; |
| 44 | } |
| 45 | } |
nothing calls this directly
no outgoing calls
no test coverage detected