Wiki

Clone wiki

TwilioFluent / Home

Welcome

TwilioFluent is a set of libraries to make working with Twilio easier.

Current features

  • A fluent TwiML builder with full documentation embedded and easy intellisense discoverability
  • Validation code for Twilio request signatures
  • Helpers for use with ASP.NET MVC3 to return ActionResults and apply signature validation with Filters

Examples

using System.Web.Mvc;
using TwilioFluent.Mvc3;
using TwilioFluent.TwiML;

namespace Example.Controllers
{
	public class TestController : TwilioController
	{
		[TwilioAuthorize("AuthToken")]
		public ActionResult Index()
		{
			return new TwilioFluentBuilder()
				.Say("Hello {0}, welcome to TwiloFluent.", "New User")
				.Pause(1)
				.Gather("actionUrl", timeout: 15, finishOnKey: DTMF.Pound, numberOfDigits: 2)
					.Say("Please enter a number between 10 and 20 inclusive.")
					.End()
				.Say("I'm sorry, I didn't catch that.  Goodbye.")
				.HangUp()
				.End();
		}
	}
}

Updated