Example #1
0
        public static async Task Main(string[] args)
        {
            var api = new UiPathWebApi(new BasicAuthenticationCredentials(), _client, false);

            var authResponse = await api.Account.AuthenticateAsync(new LoginModel
            {
                UsernameOrEmailAddress = Options.Username,
                Password    = Options.Password,
                TenancyName = Options.TenantName
            }).ConfigureAwait(false);

            var token = authResponse.Result as string;

            var api2 = new UiPathWebApi(new TokenCredentials(token), _client, false);

            ServicePointManager.DefaultConnectionLimit = 100;
            RobotsClient robotsClient = new RobotsClient(api2);

            await robotsClient.SaveEnvironmentsToJsonFiles(@"C:\Users\eugen.cutic\Desktop\Environments.txt");
        }
 public RobotsClient(UiPathWebApi _api)
 {
     api = _api;
 }