diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fea1669 --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# SublimeText Configuration # +############################# +*.sublime-project +*.sublime-workspace diff --git a/src/Vod/Video.php b/src/Vod/Video.php index 9bddfb1..7a7fd3e 100644 --- a/src/Vod/Video.php +++ b/src/Vod/Video.php @@ -27,6 +27,7 @@ class Video{ protected $title; protected $uploadDate; protected $visualizations; + protected $thumbnail; const STATUS_MAP = [ 0 => 'queued', @@ -35,6 +36,8 @@ class Video{ 24 => 'error' ]; + const THUMBNAIL_URI = 'https://video.mainstreaming.tv/image/{{contentId}}/poster'; + public function __construct(array $video) { $this->contentId = $video['contentId']; $this->customAttribute1 = $video['customAttribute1']; @@ -61,6 +64,7 @@ public function __construct(array $video) { $this->title = $video['title']; $this->uploadDate = $video['uploadDate']; $this->visualizations = $video['visualizations']; + $this->thumbnail = str_replace("{{contentId}}", $this->contentId, self::THUMBNAIL_URI); } public function getContentId() @@ -75,6 +79,16 @@ public function getStatus() return 'error'; } + + public function getThumbnail() + { + return $this->thumbnail; + } + + public function getVisualizations() + { + return $this->visualizations; + } } ?>