...
  View open merge request
Commits (1)
  • Luke081515's avatar
    Create getWatchlist · 5598c4ec
    Luke081515 authored
    Allows to get a list of your watchlist, you can specifiy a start and end timestamp, the namespace, and if you want to get more than one edit per page, if there was one.
    5598c4ec
......@@ -1110,6 +1110,30 @@ class Core extends Password {
}
return serialize($page);
}
/** getWatchlist
* Returns watchlist entrys
*/
public function getWatchlist () {
// ToDo
$data = 'action=query&format=json&list=watchlist'
. '&wlallrev=1' //P
. '&wlstart=' . $start // "Passing \"\" for timestamp parameter \"wlstart\" has been deprecated. If for some reason you need to explicitly specify the current time without calculating it client-side, use \"now\"."
. '&wlend=' . $end
. '&wlnamespace=' . $namespace
. '&wldir=newer'
. '&wllimit=max'
. '&wlprop=ids%7Ctitle%7Cflags%7Cuser%7Ccomment%7Ctimestamp%7Csizes'
. '&assert=' . $this->assert
. '&maxlag=' . $this->maxlag;
$result = $this->httpRequest($data, $this->job);
$result = json_decode($result, true);
if (array_key_exists('error', $result))
return $result['error']['code'];
// ToDo
}
/** getPageID
* returns the ID of a page
* @author Luke081515
......