matomo-org / matomo-org/developer-documentation

Write a guide how to implement an API Report method

Open
#85 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation
Dominant language
PHP
Stars
58
Forks
88
Avg merge
6d 3h
Merged PRs (30d)
13

Description

It would be good to extend the current guide about [Exposing API Methods](http://developer.piwik.org/guides/expose-api-methods) with an example how to implement an API Report method.

Maybe one example that creates a DataTable from a simple array and runs a filter on it? The filter is maybe not needed but we should explain why not simply return the plain array: Because the dataTable allows to use all our query parameters like `limit`, `showColumns`, `filter_*`, ...

Then maybe another simple example that fetches an existing report, runs a filter on it to customize the report and returns it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing Exposing API Methods guide linked in the issue. Add examples covering a DataTable built from a simple array and an existing report customized with a filter, and explain how DataTable query parameters such as limit, showColumns, and filter_* apply; the guide is done when both examples and that rationale are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.