public function getServiceNames()
    {
        $dir = __DIR__ . '/../vendor/google/apiclient-services/src/Google/Service';

        if (!is_dir($dir) || !is_readable($dir)) {
            throw new RuntimeException("Cannot read directory $dir");
        }

        $this->library->load('gapi');

        $names = array();

        foreach (glob("$dir/*.php") as $file) {
            $name = pathinfo($file, PATHINFO_FILENAME);
            $class = "Google_Service_$name";
            if (class_exists($class) && $class instanceof \Google_Service) {
                $names[] = $name;
            }
        }

        return $names;
    }