Skip to content

Commit b1f0902

Browse files
committed
updated plugins API documentation
1 parent 348fb3f commit b1f0902

File tree

105 files changed

+3772
-17535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+3772
-17535
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
/app/tmp/cache/*
99
/app/tmp/logs/*
1010
/docs/changelog.md
11+
/docs/cache/

Diff for: docs/generated/master/Index.md

+867-976
Large diffs are not rendered by default.

Diff for: docs/generated/master/Piwik/API/Request.md

+26-152
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,8 @@ forwarded to request array before it is returned.
7676
#### Signature
7777

7878
- It accepts the following parameter(s):
79-
80-
<ul>
81-
<li>
82-
<div markdown="1" class="parameter">
83-
`$request` (`string`|`array`) &mdash;
84-
85-
<div markdown="1" class="param-desc"> The base request string or array, eg, `'module=UserSettings&action=getWidescreen'`.</div>
86-
87-
<div style="clear:both;"/>
88-
89-
</div>
90-
</li>
91-
</ul>
79+
- `$request` (`string`|`array`) &mdash;
80+
The base request string or array, eg, `'module=UserSettings&action=getWidescreen'`.
9281
- It returns a `array` value.
9382

9483
<a name="__construct" id="__construct"></a>
@@ -100,19 +89,8 @@ Constructor.
10089
#### Signature
10190

10291
- It accepts the following parameter(s):
103-
104-
<ul>
105-
<li>
106-
<div markdown="1" class="parameter">
107-
`$request` (`string`|`array`) &mdash;
108-
109-
<div markdown="1" class="param-desc"> Query string that defines the API call (must at least contain a **method** parameter), eg, `'method=UserSettings.getWideScreen&idSite=1&date=yesterday&period=week&format=xml'` If a request is not provided, then we use the values in the `$_GET` and `$_POST` superglobals.</div>
110-
111-
<div style="clear:both;"/>
112-
113-
</div>
114-
</li>
115-
</ul>
92+
- `$request` (`string`|`array`) &mdash;
93+
Query string that defines the API call (must at least contain a **method** parameter), eg, `'method=UserSettings.getWideScreen&idSite=1&date=yesterday&period=week&format=xml'` If a request is not provided, then we use the values in the `$_GET` and `$_POST` superglobals.
11694

11795
<a name="process" id="process"></a>
11896
<a name="process" id="process"></a>
@@ -136,17 +114,8 @@ object.
136114
#### Signature
137115

138116

139-
<ul>
140-
<li>
141-
<div markdown="1" class="parameter">
142-
_Returns:_ ([`DataTable`](../../Piwik/DataTable.md)|`Piwik\API\Map`|`string`) &mdash;
143-
<div markdown="1" class="param-desc">The data resulting from the API call.</div>
144-
145-
<div style="clear:both;"/>
146-
147-
</div>
148-
</li>
149-
</ul>
117+
- *Returns:* [`DataTable`](../../Piwik/DataTable.md)|`Piwik\API\Map`|`string` &mdash;
118+
The data resulting from the API call.
150119
- It throws one of the following exceptions:
151120
- `PluginDeactivatedException` &mdash; if the module plugin is not activated.
152121
- [`Exception`](http://php.net/class.Exception) &mdash; if the requested API method cannot be called, if required parameters for the API method are missing or if the API method throws an exception and the **format** query parameter is **original**.
@@ -160,31 +129,11 @@ Returns the name of a plugin's API class by plugin name.
160129
#### Signature
161130

162131
- It accepts the following parameter(s):
132+
- `$plugin` (`string`) &mdash;
133+
The plugin name, eg, `'Referrers'`.
163134

164-
<ul>
165-
<li>
166-
<div markdown="1" class="parameter">
167-
`$plugin` (`string`) &mdash;
168-
169-
<div markdown="1" class="param-desc"> The plugin name, eg, `'Referrers'`.</div>
170-
171-
<div style="clear:both;"/>
172-
173-
</div>
174-
</li>
175-
</ul>
176-
177-
<ul>
178-
<li>
179-
<div markdown="1" class="parameter">
180-
_Returns:_ (`string`) &mdash;
181-
<div markdown="1" class="param-desc">The fully qualified API class name, eg, `'\Piwik\Plugins\Referrers\API'`.</div>
182-
183-
<div style="clear:both;"/>
184-
185-
</div>
186-
</li>
187-
</ul>
135+
- *Returns:* `string` &mdash;
136+
The fully qualified API class name, eg, `'\Piwik\Plugins\Referrers\API'`.
188137

189138
<a name="processrequest" id="processrequest"></a>
190139
<a name="processRequest" id="processRequest"></a>
@@ -195,41 +144,13 @@ Helper method that processes an API request in one line using the variables in `
195144
#### Signature
196145

197146
- It accepts the following parameter(s):
147+
- `$method` (`string`) &mdash;
148+
The API method to call, ie, `'Actions.getPageTitles'`.
149+
- `$paramOverride` (`array`) &mdash;
150+
The parameter name-value pairs to use instead of what's in `$_GET` & `$_POST`.
198151

199-
<ul>
200-
<li>
201-
<div markdown="1" class="parameter">
202-
`$method` (`string`) &mdash;
203-
204-
<div markdown="1" class="param-desc"> The API method to call, ie, `'Actions.getPageTitles'`.</div>
205-
206-
<div style="clear:both;"/>
207-
208-
</div>
209-
</li>
210-
<li>
211-
<div markdown="1" class="parameter">
212-
`$paramOverride` (`array`) &mdash;
213-
214-
<div markdown="1" class="param-desc"> The parameter name-value pairs to use instead of what's in `$_GET` & `$_POST`.</div>
215-
216-
<div style="clear:both;"/>
217-
218-
</div>
219-
</li>
220-
</ul>
221-
222-
<ul>
223-
<li>
224-
<div markdown="1" class="parameter">
225-
_Returns:_ (`mixed`) &mdash;
226-
<div markdown="1" class="param-desc">The result of the API request. See [process()](/api-reference/Piwik/API/Request#process).</div>
227-
228-
<div style="clear:both;"/>
229-
230-
</div>
231-
</li>
232-
</ul>
152+
- *Returns:* `mixed` &mdash;
153+
The result of the API request. See [process()](/api-reference/Piwik/API/Request#process).
233154

234155
<a name="getrequestparametersget" id="getrequestparametersget"></a>
235156
<a name="getRequestParametersGET" id="getRequestParametersGET"></a>
@@ -253,39 +174,12 @@ Returns the URL for the current requested report w/o any filter parameters.
253174
#### Signature
254175

255176
- It accepts the following parameter(s):
256-
257-
<ul>
258-
<li>
259-
<div markdown="1" class="parameter">
260-
`$module` (`string`) &mdash;
261-
262-
<div markdown="1" class="param-desc"> The API module.</div>
263-
264-
<div style="clear:both;"/>
265-
266-
</div>
267-
</li>
268-
<li>
269-
<div markdown="1" class="parameter">
270-
`$action` (`string`) &mdash;
271-
272-
<div markdown="1" class="param-desc"> The API action.</div>
273-
274-
<div style="clear:both;"/>
275-
276-
</div>
277-
</li>
278-
<li>
279-
<div markdown="1" class="parameter">
280-
`$queryParams` (`array`) &mdash;
281-
282-
<div markdown="1" class="param-desc"> Query parameter overrides.</div>
283-
284-
<div style="clear:both;"/>
285-
286-
</div>
287-
</li>
288-
</ul>
177+
- `$module` (`string`) &mdash;
178+
The API module.
179+
- `$action` (`string`) &mdash;
180+
The API action.
181+
- `$queryParams` (`array`) &mdash;
182+
Query parameter overrides.
289183
- It returns a `string` value.
290184

291185
<a name="getcurrenturlwithoutgenericfilters" id="getcurrenturlwithoutgenericfilters"></a>
@@ -297,19 +191,8 @@ Returns the current URL without generic filter query parameters.
297191
#### Signature
298192

299193
- It accepts the following parameter(s):
300-
301-
<ul>
302-
<li>
303-
<div markdown="1" class="parameter">
304-
`$params` (`array`) &mdash;
305-
306-
<div markdown="1" class="param-desc"> Query parameter values to override in the new URL.</div>
307-
308-
<div style="clear:both;"/>
309-
310-
</div>
311-
</li>
312-
</ul>
194+
- `$params` (`array`) &mdash;
195+
Query parameter values to override in the new URL.
313196
- It returns a `string` value.
314197

315198
<a name="shouldloadflatten" id="shouldloadflatten"></a>
@@ -329,15 +212,6 @@ Returns the segment query parameter from the original request, without modificat
329212
#### Signature
330213

331214

332-
<ul>
333-
<li>
334-
<div markdown="1" class="parameter">
335-
_Returns:_ (`array`|`bool`) &mdash;
336-
<div markdown="1" class="param-desc"></div>
337-
338-
<div style="clear:both;"/>
339-
340-
</div>
341-
</li>
342-
</ul>
215+
- *Returns:* `array`|`bool` &mdash;
216+
343217

Diff for: docs/generated/master/Piwik/Access.md

+4-24
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,11 @@ Privileges will be rescinded even if an exception is thrown.
4040
#### Signature
4141

4242
- It accepts the following parameter(s):
43+
- `$function` (`Piwik\callback`) &mdash;
44+
The callback to execute. Should accept no arguments.
4345

44-
<ul>
45-
<li>
46-
<div markdown="1" class="parameter">
47-
`$function` (`Piwik\callback`) &mdash;
48-
49-
<div markdown="1" class="param-desc"> The callback to execute. Should accept no arguments.</div>
50-
51-
<div style="clear:both;"/>
52-
53-
</div>
54-
</li>
55-
</ul>
56-
57-
<ul>
58-
<li>
59-
<div markdown="1" class="parameter">
60-
_Returns:_ (`mixed`) &mdash;
61-
<div markdown="1" class="param-desc">The result of `$function`.</div>
62-
63-
<div style="clear:both;"/>
64-
65-
</div>
66-
</li>
67-
</ul>
46+
- *Returns:* `mixed` &mdash;
47+
The result of `$function`.
6848
- It throws one of the following exceptions:
6949
- [`Exception`](http://php.net/class.Exception) &mdash; rethrows any exceptions thrown by `$function`.
7050

0 commit comments

Comments
 (0)