20 function __construct(API
$api, string $call) {
25 function __invoke(array $args) {
26 if ($this->api
->exists($this->call
."_url", $url)) {
27 $url = new Url(uri_template($url, (array)current($args)));
28 $promise = $this->api
->withUrl($url)->get(...$args);
30 $promise = $this->api
->{$this->call
}->get(...$args);