User:Prisicilavilemen/Sandbox/API:Pageswithprop

GET request List all pages using a given page property.

Sample code 2
hello.py

Sample code 3
 "query", "list" => "pageswithprop", "pwppropname" => "displaytitle", "format" => "json" ];

$url = $endPoint. "?" . http_build_query( $params ); $ch = curl_init($url);

curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );

$output = curl_exec( $ch );

curl_close( $ch );

$result = json_decode( $output, true );

foreach( $result["query"]["pageswithprop"] as $k => $v ) { echo( $v["title"] . "\n" ); }