10 defined(
'JPATH_PLATFORM') or die;
34 public function getSiteInfo(array $siprop = null, $sifilteriw = null, $sishowalldb =
false, $sinumberingroup =
false, array $siinlanguagecode = null)
37 $path =
'?action=query&meta=siteinfo';
41 $path .=
'&siprop=' . $this->buildParameter($siprop);
44 if (isset($sifilteriw))
46 $path .=
'&sifilteriw=' . $sifilteriw;
51 $path .=
'&sishowalldb=';
56 $path .=
'&sinumberingroup=';
59 if (isset($siinlanguagecode))
61 $path .=
'&siinlanguagecode=' . $this->buildParameter($siinlanguagecode);
65 $response = $this->client->get($this->fetchUrl($path));
67 return $this->validateResponse($response);
89 public function getEvents(array $leprop = null, $letype = null, $leaction = null, $letitle = null, $leprefix = null, $letag = null,
90 $leuser = null, $lestart = null, $leend = null, $ledir = null, $lelimit = null)
93 $path =
'?action=query&list=logevents';
97 $path .=
'&leprop=' . $this->buildParameter($leprop);
102 $path .=
'&letype=' . $letype;
105 if (isset($leaction))
107 $path .=
'&leaction=' . $leaction;
112 $path .=
'&letitle=' . $letitle;
115 if (isset($leprefix))
117 $path .=
'&leprefix=' . $leprefix;
122 $path .=
'&letag=' . $letag;
127 $path .=
'&leuser=' . $leuser;
132 $path .=
'&lestart=' . $lestart;
137 $path .=
'&leend=' . $leend;
142 $path .=
'&ledir=' . $ledir;
147 $path .=
'&lelimit=' . $lelimit;
151 $response = $this->client->get($this->fetchUrl($path));
153 return $this->validateResponse($response);
177 public function getRecentChanges($rcstart = null, $rcend = null, $rcdir = null, array $rcnamespace = null, $rcuser = null, $rcexcludeuser = null,
178 $rctag = null, array $rcprop = null, array $rctoken = null, array $rcshow = null, $rclimit = null, $rctype = null, $rctoponly = null)
181 $path =
'?action=query&list=recentchanges';
185 $path .=
'&rcstart=' . $rcstart;
190 $path .=
'&rcend=' . $rcend;
195 $path .=
'&rcdir=' . $rcdir;
198 if (isset($rcnamespace))
200 $path .=
'&rcnamespaces=' . $this->buildParameter($rcnamespace);
205 $path .=
'&rcuser=' . $rcuser;
208 if (isset($rcexcludeuser))
210 $path .=
'&rcexcludeuser=' . $rcexcludeuser;
215 $path .=
'&rctag=' . $rctag;
220 $path .=
'&rcprop=' . $this->buildParameter($rcprop);
225 $path .=
'&rctoken=' . $this->buildParameter($rctoken);
230 $path .=
'&rcshow=' . $this->buildParameter($rcshow);
235 $path .=
'&rclimit=' . $rclimit;
240 $path .=
'&rctype=' . $rctype;
243 if (isset($rctoponly))
245 $path .=
'&rctoponly=' . $rctoponly;
249 $response = $this->client->get($this->fetchUrl($path));
251 return $this->validateResponse($response);
269 public function getProtectedTitles(array $ptnamespace = null, array $ptlevel = null, $ptlimit = null, $ptdir = null, $ptstart = null,
270 $ptend = null, array $ptprop = null)
273 $path =
'?action=query&list=protectedtitles';
275 if (isset($ptnamespace))
277 $path .=
'&ptnamespace=' . $this->buildParameter($ptnamespace);
282 $path .=
'&ptlevel=' . $this->buildParameter($ptlevel);
287 $path .=
'&ptlimit=' . $ptlimit;
292 $path .=
'&ptdir=' . $ptdir;
297 $path .=
'&ptstart=' . $ptstart;
302 $path .=
'&ptend=' . $ptend;
307 $path .=
'&ptprop=' . $this->buildParameter($ptprop);
311 $response = $this->client->get($this->fetchUrl($path));
313 return $this->validateResponse($response);