public function api($name)
    {
        switch ($name) {
            case 'user':
            case 'users':
                $api = new Api\Users($this->getHttpClient());
                break;
            default:
                throw new InvalidArgumentException(sprintf('Undefined api instance called: "%s"', $name));
        }

        return $api;
    }
public function api($name)
    {
        switch ($name) {
            case 'user':
            case 'users':
                $api = new Api\Users($this->getHttpClient());
                break;
            default:
                throw new InvalidArgumentException(sprintf('Undefined api instance called: "%s"', $name));
        }

        return $api;
    }
@param string $name

@throws InvalidArgumentException

@return AbstractApi