示例#1
0
        /// <summary>
        /// Sends message to Viber user.
        /// </summary>
        /// <param name="message">Instance of message</param>
        /// <param name="isBroadcast"><c>true</c> if broadcast message, otherwise - <c>false</c>.</param>
        /// <returns>Message token.</returns>
        private async Task <long> SendMessageAsync(MessageBase message, bool isBroadcast = false)
        {
            var result = await RequestApiAsync <SendMessageResponse>(isBroadcast? "broadcast_message" : "send_message", message);

            return(result.MessageToken);
        }
示例#2
0
        /// <summary>
        /// Sends message to Viber user.
        /// </summary>
        /// <param name="message">Instance of message</param>
        /// <returns>Message token.</returns>
        private async Task <long> SendMessageAsync(MessageBase message)
        {
            var result = await RequestApiAsync <SendMessageResponse>("send_message", message);

            return(result.MessageToken);
        }