catalyst: add file with a first version of the API backend
The API file provides methods for the endpoints that currently exist in the Catalyst API.
Tested manually by adding temporary code to index.php
. For instance:
require_once 'catalyst.php';
$cl = CatalystClient::newClient('');
print_r($cl->getCharts());
$env = new EnvironmentRequest("bla1", "mediawiki");
$cl->postEnvironment($env);
$env = (new EnvironmentRequest("bla2", "mediawiki"))
->withIngress("ingresooo")
->withExtension("thanks", "1020578");
$cl->postEnvironment($env);
print_r($cl->getEnvironments());
Bug: T363198