public static YtStore YtStore(this Cfg cfg, ILogger log) { var reader = new YtClient(cfg.App, log); var ytStore = new YtStore(reader, cfg.DataStore(cfg.App.Storage.DbPath)); return(ytStore); }
public YtDataUpdater(YtStore store, AppCfg cfg, UpdateType updateType, Func <Task <DbConnection> > getConnection, ILogger log) { UpdateType = updateType; GetConnection = getConnection; Store = store; Cfg = cfg; Log = log; Scraper = new YtScraper(cfg.Scraper); Api = new YtClient(cfg.YTApiKeys, log); }
public YtStore(YtClient reader, ISimpleFileStore store) { Yt = reader; Store = store; Videos = new FileCollection <VideoStored>(Store, v => v.VideoId, "Videos", Yt.Cfg.CacheType, CacheDataDir); Channels = new FileCollection <ChannelStored>(Store, v => v.ChannelId, "Channels", Yt.Cfg.CacheType, CacheDataDir); RecommendedVideosCollection = new FileCollection <RecommendedVideoStored>(Store, v => v.VideoId, "RecommendedVideos", Yt.Cfg.CacheType, CacheDataDir); ChannelVideosCollection = new FileCollection <ChannelVideosStored>(Store, c => c.ChannelId, "ChannelVideos", Yt.Cfg.CacheType, CacheDataDir); }
public YtCollector(YtStore store, AppCfg cfg, SnowflakeConnectionProvider sf, IPipeCtx pipeCtx, WebScraper webScraper, ChromeScraper chromeScraper, YtClient api) { Store = store; Cfg = cfg; Sf = sf; PipeCtx = pipeCtx; Scraper = webScraper; ChromeScraper = chromeScraper; Api = api; }