/// <summary> /// Validate Session /// </summary> public void ValidateSession() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); MemberParameters @params = new MemberParameters { SessionGuid = "ad9001f33ed6875b5f0e75bce52cbc34", MemberId = 1, Format = "json" }; // Run the query string errorString = ""; MemberResponse result = route4Me.ValidateSession(@params, out errorString); Console.WriteLine(""); if (result != null) { Console.WriteLine("ValidateSession executed successfully"); Console.WriteLine("status: " + result.Status); Console.WriteLine("api_key: " + result.ApiKey); Console.WriteLine("member_id: " + result.MemberId); Console.WriteLine("---------------------------"); } else { Console.WriteLine("ValidateSession error: {0}", errorString); } }
/// <summary> /// User Authetntication /// </summary> public void UserAuthentication() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); MemberParameters @params = new MemberParameters { StrEmail = "*****@*****.**", StrPassword = "******", Format = "json" }; // Run the query string errorString = ""; MemberResponse result = route4Me.UserAuthentication(@params, out errorString); Console.WriteLine(""); if (result != null) { Console.WriteLine("UserAuthentication executed successfully"); Console.WriteLine("status: " + result.Status); Console.WriteLine("api_key: " + result.ApiKey); Console.WriteLine("member_id: " + result.MemberId); Console.WriteLine("---------------------------"); } else { Console.WriteLine("UserAuthentication error: {0}", errorString); } }
/// <summary> /// User Registration /// </summary> public void UserRegistration() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); MemberParameters @params = new MemberParameters { StrEmail = "*****@*****.**", StrPassword_1 = "11111111", StrPassword_2 = "11111111", StrFirstName = "Olman", StrLastName = "Progman", StrIndustry = "Transportation", Format = "json", ChkTerms = 1, DeviceType = "web", Plan = "free", MemberType = 5 }; // Run the query string errorString = ""; MemberResponse result = route4Me.UserRegistration(@params, out errorString); Console.WriteLine(""); if (result != null) { Console.WriteLine("UserRegistration executed successfully"); Console.WriteLine("status: " + result.Status); Console.WriteLine("api_key: " + result.ApiKey); Console.WriteLine("member_id: " + result.MemberId); Console.WriteLine("---------------------------"); } else { Console.WriteLine("UserRegistration error: {0}", errorString); } }