1 module konnexengine.video.youtube.video.blueprint; 2 3 import std.uuid : UUID; 4 import vibe.inet.url : URL; 5 import konnexengine.video.core.video.blueprint : VideoInterface; 6 7 struct YoutubeVideos 8 { 9 YoutubeVideo[] videos; 10 } 11 12 interface YoutubeVideoInterface 13 { 14 @property string youtubeID(); 15 @property ResourceURL[] thumbnails(); 16 } 17 18 class YoutubeVideo : VideoInterface 19 { 20 private 21 { 22 UUID v_id; 23 string v_youtube_id; 24 string v_title; 25 string v_description; 26 ResourceURL[] v_thumbs; 27 } 28 29 @property UUID id() 30 { 31 return v_id; 32 } 33 34 @property UUID id(UUID input) 35 { 36 return v_id = input; 37 } 38 39 @property string youtubeID() 40 { 41 return v_youtube_id; 42 } 43 44 @property string title() 45 { 46 return v_title; 47 } 48 49 @property string description() 50 { 51 return v_description; 52 } 53 54 @property ResourceURL[] thumbnails() 55 { 56 return v_thumbs; 57 } 58 59 } 60 61 interface ResourceURLInterface 62 { 63 @property UUID id(); 64 @property string resourceType(); 65 @property URL resourceURL(); 66 } 67 68 class ResourceURL : ResourceURLInterface 69 { 70 private 71 { 72 UUID r_id; 73 string r_type; 74 URL r_url; 75 } 76 77 @property UUID id() 78 { 79 return r_id; 80 } 81 82 @property UUID id(UUID input) 83 { 84 return r_id = input; 85 } 86 87 @property string resourceType() 88 { 89 return r_type; 90 } 91 92 @property string resourceType(string input) 93 { 94 return r_type = "" ~ input; 95 } 96 97 @property URL resourceURL() 98 { 99 return r_url; 100 } 101 102 @property URL resourceURL(URL input) 103 { 104 return r_url = input; 105 } 106 } 107 108 class ThumbnailURL : ResourceURL 109 { 110 }