/// <summary> /// Creates a new subscription with basic authentication (username and password) /// </summary> /// <param name="publishToUrl">URL to receive HTTP post</param> /// <param name="basicUsernamePassword">The username and password information for the basic authentication</param> /// <param name="vehicleId">Optional if you want only to subscribe to a specific vehicle</param> /// <returns></returns> public PublishSubscribeModel CreatePublishSubscribe(string publishToUrl, PublishSubscribeAuthenticationData_Basic basicUsernamePassword, int?vehicleId = null) { PublishSubscribeCreateModel model = CreatePublishSubscribeCreateModel(publishToUrl, ApiPublishSubscribeAuthenticationType.BasicUsernameAndPassword, vehicleId); model.AuthenticationData = Newtonsoft.Json.JsonConvert.SerializeObject(basicUsernamePassword); return(CreatePublishSubscribe(model)); }
/// <summary> /// Creates a new subscription with basic authentication (username and password) /// </summary> /// <param name="publishToUrl">URL to receive HTTP post</param> /// <param name="basicUsernamePassword">The username and password information for the basic authentication</param> /// <param name="vehicleId">Optional if you want only to subscribe to a specific vehicle</param> /// <returns></returns> public void EditPublishSubscribe(int publishSubscribeId, string publishToUrl, PublishSubscribeAuthenticationData_Basic basicUsernamePassword, int?vehicleId = null) { PublishSubscribeEditModel model = CreatePublishSubscribeEditModel(publishToUrl, ApiPublishSubscribeAuthenticationType.BasicUsernameAndPassword, vehicleId); model.AuthenticationData = Newtonsoft.Json.JsonConvert.SerializeObject(basicUsernamePassword); EditPublishSubscribe(publishSubscribeId, model); }