public function getThumbnails($videoId, $format = null)
    {
        $listResponse = $this->videos->listVideos('snippet', array('id' => $videoId));
        if (empty($listResponse)) {
            throw new \RuntimeException(sprintf('Could not find video with id %s', $videoId));
        }
        $video = $listResponse[0];
        $videoSnippet = $video['snippet'];
        if (is_null($format)) {
            return $videoSnippet['thumbnails']['data'];
        }
        if (!in_array($format, array('default', 'medium', 'high'))) {
            throw new \InvalidArgumentException(sprintf('Invalid format "%s"', $format));
        }

        return $videoSnippet['thumbnails']['data'][$format];
    }