MCPcopy Create free account
hub / github.com/Rello/analytics / Capabilities

Class Capabilities

lib/Capabilities.php:16–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14use OCP\IURLGenerator;
15
16class 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected