src/Connection.php
public function api(string $name): API\AbstractAPI
    {
        $name = ucfirst($name);
        $class = "ArkEcosystem\\Client\\API\\{$name}";

        if (! class_exists($class)) {
            throw new RuntimeException("Class [$class] does not exist.");
        }

        return new $class($this);
    }
public function api(string $name): API\AbstractAPI
    {
        $name = ucfirst($name);
        $class = "ArkEcosystem\\Client\\API\\{$name}";

        if (! class_exists($class)) {
            throw new RuntimeException("Class [$class] does not exist.");
        }

        return new $class($this);
    }
public function api ( string $ name ) : API \ AbstractAPI { $ name = ucfirst ( $ name ) ; $ class = "ArkEcosystem\\Client\\API\\{$name}" ; if ( ! class_exists ( $ class ) ) { throw new RuntimeException ( "Class [$class] does not exist." ) ; } return new $ class ( $ this ) ; }
Make a new resource instance.

@param string $name

@return \ArkEcosystem\Client\API\AbstractAPI
Make a new resource instance .