/// <summary> /// Create New Configuration Key /// </summary> public void AddNewConfigurationKey() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); MemberConfigurationParameters @params = new MemberConfigurationParameters { config_key = "destination_icon_uri", config_value = "value" }; // Run the query string errorString = ""; MemberConfigurationResponse result = route4Me.CreateNewConfigurationKey(@params, out errorString); Console.WriteLine(""); if (result != null) { Console.WriteLine("AddNewConfigurationKey executed successfully"); Console.WriteLine("Result: " + result.result); Console.WriteLine("Affected: " + result.affected); Console.WriteLine("---------------------------"); } else { Console.WriteLine("AddNewConfigurationKey error: {0}", errorString); } }
public void AddConfigurationKeyArray() { var route4Me = new Route4MeManager(ActualApiKey); var parametersArray = new MemberConfigurationParameters[] { new MemberConfigurationParameters { config_key = "Test Height 5", config_value = "155" }, new MemberConfigurationParameters { config_key = "Test Weight 5", config_value = "55" }, }; // Run the query var result = route4Me .CreateNewConfigurationKey(parametersArray, out string errorString); if ((result?.result ?? null) == "OK" && (result?.affected ?? 0) > 0) { configKeysToRemove.Add("Test Height 5"); configKeysToRemove.Add("Test Weight 5"); } PrintConfigKey(result, errorString); RemoveConfigKeys(); }
/// <summary> /// Create New Configuration Key /// </summary> public void AddNewConfigurationKey() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); MemberConfigurationParameters @params = new MemberConfigurationParameters { config_key = "destination_icon_uri", config_value = "value" }; // Run the query string errorString = ""; MemberConfigurationResponse result = route4Me.CreateNewConfigurationKey(@params, out errorString); Console.WriteLine(""); if (result != null) { Console.WriteLine("AddNewConfigurationKey executed successfully"); Console.WriteLine("Result: " + result.result); Console.WriteLine("Affected: " + result.affected); Console.WriteLine("---------------------------"); } else { Console.WriteLine("AddNewConfigurationKey error: {0}", errorString); } }
/// <summary> /// Create New Configuration Key /// </summary> public void AddNewConfigurationKey() { // Create the manager with the api key var route4Me = new Route4MeManager(ActualApiKey); var @params = new MemberConfigurationParameters { config_key = "Test Config Key 5", config_value = "Test Config Value 5" }; // Run the query MemberConfigurationResponse result = route4Me .CreateNewConfigurationKey(@params, out string errorString); if ((result?.result ?? null) == "OK" && (result?.affected ?? 0) > 0) { configKeysToRemove.Add("Test Config Key 5"); } PrintConfigKey(result, errorString); RemoveConfigKeys(); }