public static function streamSnapshot($transport, $streamId, $name, $format, $time = NULL, $notifyUrl = NULL, $pipeline = NULL)
{
$url = self::_getApiBaseUrl() . "streams/{$streamId}/snapshot";
$params = array('name' => $name, 'format' => $format);
if (!empty($time)) {
$params['time'] = $time;
}
if (!empty($notifyUrl)) {
$params['notifyUrl'] = $notifyUrl;
}
if (!empty($pipeline)) {
$params['pipeline'] = $pipeline;
}
$body = json_encode($params);
return $transport->send(HttpRequest::POST, $url, $body);
}