コード例 #1
0
        static void Main()
        {
            List <Article> articles     = ArticleService.DownloadArticlesFromTelex();
            List <string>  jsonArticles = ArticleService.ArticlesToJson(articles);

            Token token = ModexService.ObtainToken().Result;

            File.WriteAllText("token.dat", JsonSerializer.Serialize(token));
            Console.WriteLine("Token obtained!");

            Console.Write("Enter a name for the schema: ");
            string schemaName = Console.ReadLine();

            EntityContainer entityContainer = UploadData(jsonArticles, schemaName, token);

            File.WriteAllText("entities.dat", JsonSerializer.Serialize(entityContainer));

            Console.WriteLine("Process finished");
            Console.ReadKey();
        }