10 defined(
'JPATH_PLATFORM') or die;
35 public function getImages(array $titles, $imagelimit = null, $imagecontinue = null, $imimages = null, $imdir = null)
38 $path =
'?action=query&prop=images';
41 $path .=
'&titles=' . $this->buildParameter($titles);
43 if (isset($imagelimit))
45 $path .=
'&imagelimit=' . $imagelimit;
50 $path .=
'&imagecontinue=';
55 $path .=
'&imimages=' . $imimages;
60 $path .=
'&imdir=' . $imdir;
64 $response = $this->client->get($this->fetchUrl($path));
66 return $this->validateResponse($response);
78 public function getImagesUsed(array $titles)
81 $path =
'?action=query&generator=images&prop=info';
84 $path .=
'&titles=' . $this->buildParameter($titles);
87 $response = $this->client->get($this->fetchUrl($path));
89 return $this->validateResponse($response);
109 public function getImageInfo(array $liprop = null, $lilimit = null, $listart = null, $liend = null, $liurlwidth = null,
110 $liurlheight = null, $limetadataversion = null, $liurlparam = null, $licontinue = null)
113 $path =
'?action=query&prop=imageinfo';
117 $path .=
'&liprop=' . $this->buildParameter($liprop);
122 $path .=
'&lilimit=' . $lilimit;
127 $path .=
'&listart=' . $listart;
132 $path .=
'&liend=' . $liend;
135 if (isset($liurlwidth))
137 $path .=
'&liurlwidth=' . $liurlwidth;
140 if (isset($liurlheight))
142 $path .=
'&liurlheight=' . $liurlheight;
145 if (isset($limetadataversion))
147 $path .=
'&limetadataversion=' . $limetadataversion;
150 if (isset($liurlparam))
152 $path .=
'&liurlparam=' . $liurlparam;
157 $path .=
'&alcontinue=';
161 $response = $this->client->get($this->fetchUrl($path));
163 return $this->validateResponse($response);
185 public function enumerateImages($aifrom = null, $aito = null, $aiprefix = null, $aiminsize = null, $aimaxsize = null, $ailimit = null,
186 $aidir = null, $aisha1 = null, $aisha1base36 = null, array $aiprop = null, $aimime = null)
189 $path =
'?action=query&list=allimages';
193 $path .=
'&aifrom=' . $aifrom;
198 $path .=
'&aito=' . $aito;
201 if (isset($aiprefix))
203 $path .=
'&aiprefix=' . $aiprefix;
206 if (isset($aiminsize))
208 $path .=
'&aiminsize=' . $aiminsize;
211 if (isset($aimaxsize))
213 $path .=
'&aimaxsize=' . $aimaxsize;
218 $path .=
'&ailimit=' . $ailimit;
223 $path .=
'&aidir=' . $aidir;
227 $path .=
'&aisha1=' . $aisha1;
230 if (isset($aisha1base36))
232 $path .=
'&$aisha1base36=' . $aisha1base36;
237 $path .=
'&aiprop=' . $this->buildParameter($aiprop);
242 $path .=
'&aimime=' . $aimime;
246 $response = $this->client->get($this->fetchUrl($path));
248 return $this->validateResponse($response);