Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var records = ReadLogFile(@"c:\dev\Quiltoni.PixelBot\PixelBot.ReplayLog\log.csv");

            Console.Out.WriteLine(records.First().DateStamp);
            Console.Out.WriteLine($"Read {records.Count()}");

            var totalRecords = records.GroupBy(r => r.UpdatedUser)
                               .Select(r => (r.Key, r.Sum(l => l.Changed), "batch"));

            var options = Options.Create <PixelBotConfig>(new PixelBotConfig {
                Google = new PixelBotConfig.GoogleConfig {
                }
            });
            var proxy = new DryadGoogleSheetProxy(options, NullLoggerFactory.Instance);

            proxy.BatchAddPixelsForUsers(totalRecords);

            Console.ReadLine();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var records = ReadLogFile(@"c:\dev\Quiltoni.PixelBot\PixelBot.ReplayLog\log.csv");

            Console.Out.WriteLine(records.First().DateStamp);
            Console.Out.WriteLine($"Read {records.Count()}");

            var totalRecords = records.GroupBy(r => r.UpdatedUser)
                               .Select(r => (r.Key, r.Sum(l => l.Changed), "batch"));

            var options = Options.Create <PixelBotConfig>(new PixelBotConfig {
                Google = new PixelBotConfig.GoogleConfig {
                    //SheetId = "1WPBnPwKrv66JQGOdbd8ngeSSeZuT4-CWVL6tiAblp_E",
                    //ClientId = "705417911268-3mdfebph1ifahfptkm5s3c12udu33kou.apps.googleusercontent.com",
                    //ClientSecret = "MgKxJJ5PfFyLio9p6VA6qIW-"
                }
            });
            var proxy = new DryadGoogleSheetProxy(options, NullLoggerFactory.Instance);

            proxy.BatchAddPixelsForUsers(totalRecords);

            Console.ReadLine();
        }