/// <summary> /// Validates a push request. Duplicates Push without actually sending the alert. See Push /// </summary> /// <param name="alert">The message to be pushed</param> /// <param name="deviceTypes">use null for broadcast</param> /// <param name="deviceId">use null for broadcast or deviceTypes must contain 1 element that distinguishes this deviceId</param> /// <param name="deviceAlerts">per device alert messages and extras</param> /// <param name="customAudience">a more specific way to choose the audience for the push. If this is set, deviceId is ignored</param> /// <returns></returns> public BaseResponse Validate(String alert, IList <DeviceType> deviceTypes = null, String deviceId = null, IList <BaseAlert> deviceAlerts = null, Audience customAudience = null) { var request = new PushValidateRequest(CreatePush(alert, deviceTypes, deviceId, deviceAlerts, customAudience)); var response = request.ExecuteAsync(); return(response.Result); }
public PushResponse Validate(Push content) { var request = new PushValidateRequest(content, _cfg); return(SendRequest(request)); }