/// <summary> /// Create segments visible and usable in the dashboard and API - Requires OneSignal Plan /// </summary> /// <param name="options">Parameters for creating a segment</param> /// <param name="appId">Optional app id if you want an app id different than what is defined in OneSignalConfiguration</param> /// <returns>Status of the create segment call</returns> public async Task <GenericResponse> CreateSegmentAsync(CreateSegmentOptions options, string appId = null) { return(await PostAsync <GenericResponse>($"apps/{appId ?? OneSignalConfiguration.GetAppId()}/segments", options)); }
/// <summary> /// Create segments visible and usable in the dashboard and API - Requires OneSignal Plan /// </summary> /// <param name="options">Parameters for creating a segment</param> /// <param name="appId">Optional app id if you want an app id different than what is defined in OneSignalConfiguration</param> /// <returns>Status of the create segment call</returns> public GenericResponse CreateSegment(CreateSegmentOptions options, string appId = null) { return(Post <GenericResponse>($"apps/{appId ?? OneSignalConfiguration.GetAppId()}/segments", options)); }