예제 #1
0
 static void Main(string[] args)
 {
     var profileData             = KolokProfileData();
     var actions                 = CreateActionItem();
     var routeBuilderTransformer = new RouteBuilderTransformer(profileData, actions);
     var planActions             = routeBuilderTransformer.Actions();
     //Preferable to use the pipeline isnstead of the below to push data
     var api    = profileData.CreateLogin();
     var upload = api.ExecuteRequest(new Trackmatic.Rest.Planning.Requests.UploadActions(api.Context, new ActionCollection(planActions)));
 }
예제 #2
0
        static void Main(string[] args)
        {
            var csvReader = new CsvReader();

            var path = @"TestFiles/TestFileTemplate3.csv";

            var content = File.ReadAllText(path);
            var line    = csvReader.Read(content);

            var actions = line.Where(p => p.Data != null).Select(p => new ActionItem(p)).ToList();
            var site    = TrackmaticTestSite();
            var routeBuilderTransformer = new RouteBuilderTransformer(site, actions);
            var planActions             = routeBuilderTransformer.Actions();
            var api    = CreateLogin(TrackmaticTestSite());
            var upload = api.ExecuteRequest(new Trackmatic.Rest.Planning.Requests.UploadActions(api.Context, new ActionCollection(planActions)));
        }