/**
         * List all labels for a notification rule.
         *
         * @param ruleID The notification rule ID.
         * @return A list of all labels for a notification rule
         */

        /// <summary>
        /// List all labels for a notification rule
        /// </summary>
        /// <param name="ruleId"> The notification rule ID.</param>
        /// <returns>A list of all labels for a notification rule</returns>
        public async Task <List <Label> > GetLabelsAsync(string ruleId)
        {
            Arguments.CheckNonEmptyString(ruleId, nameof(ruleId));

            var response = await _service.GetNotificationRulesIDLabelsAsync(ruleId).ConfigureAwait(false);

            return(response.Labels);
        }
Пример #2
0
        /**
         * List all labels for a notification rule.
         *
         * @param ruleID The notification rule ID.
         * @return A list of all labels for a notification rule
         */

        /// <summary>
        /// List all labels for a notification rule
        /// </summary>
        /// <param name="ruleId"> The notification rule ID.</param>
        /// <returns>A list of all labels for a notification rule</returns>
        public async Task <List <Label> > GetLabelsAsync(string ruleId)
        {
            Arguments.CheckNonEmptyString(ruleId, nameof(ruleId));

            return((await _service.GetNotificationRulesIDLabelsAsync(ruleId)).Labels);
        }
        /**
         * List all labels for a notification rule.
         *
         * @param ruleID The notification rule ID.
         * @return A list of all labels for a notification rule
         */

        /// <summary>
        /// List all labels for a notification rule
        /// </summary>
        /// <param name="ruleId"> The notification rule ID.</param>
        /// <returns>A list of all labels for a notification rule</returns>
        public async Task <List <Label> > GetLabelsAsync(string ruleId)
        {
            Arguments.CheckNonEmptyString(ruleId, nameof(ruleId));

            return(await _service.GetNotificationRulesIDLabelsAsync(ruleId).ContinueWith(t => t.Result.Labels));
        }