コード例 #1
0
ファイル: Program.cs プロジェクト: calca/asanataskexporter
        static int Main(string[] args)
        {
            var apiKey = ConfigurationManager.AppSettings["apiKey"];
            var projectRequest = string.Empty;

            if (string.IsNullOrWhiteSpace(apiKey))
            {
                Console.WriteLine("You must enter your API key in the App.config");
                return 1;
            }

            var read = new ReadTasks(apiKey);

            var name = "asana_export" + DateTime.Now.ToString("yyyyMMdd") + ".csv";
            string fileName = Path.Combine(
                Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
                name);
            FileInfo file = new FileInfo(fileName);

            if (read.CreateCVS(file,args[0]))
            {
                Console.WriteLine("Export complete.");
                return 1;
            }

            Console.WriteLine("Error running importer ");
            return 0;
        }
コード例 #2
0
        public void CreateCVSForProject()
        {
            var r = new ReadTasks("dYdEDDm.j6Z2c5HeN7S4w10AvrhGqFtc");

            var name = "asana_export" + DateTime.Now.ToString("yyyyMMdd") + ".csv";
            string fileName = Path.Combine(
                Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
                name);
            FileInfo file = new FileInfo(fileName);

            Assert.IsTrue(r.CreateCVS(file,"Ferrero - DCP"));
        }