function-templates icon indicating copy to clipboard operation
function-templates copied to clipboard

Add Hold Music Funlet

Open imnotjames opened this issue 6 years ago • 3 comments

Adds a "Hold Music" funlet, similar to the hold-music twimlet.

Instead of accepting HTTP parameters for defining the bucket & message, this instead uses environment variables.

Closes #20

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • [x] I acknowledge that all my contributions will be made under the project's license.

imnotjames avatar Oct 20 '19 01:10 imnotjames

For anyone that reviews this - should I stay away from async/await or can I rewrite some of this to use that instead? It'd be a bit cleaner than all the promise chains.

imnotjames avatar Oct 20 '19 02:10 imnotjames

Hey @imnotjames, thanks for this!

Twilio Functions supports Node version 8 and 10, both of which have support for async/await so no need to hold back there!

Also, could you support both environment variables and URL parameters for the variables? We want the funlets to be drop in replacements for twimlets, so supporting those parameters is still important.

philnash avatar Oct 20 '19 22:10 philnash

Regarding async/await , fantastic. I'll take care of that as well as supporting both mechanisms for input values.

imnotjames avatar Oct 20 '19 22:10 imnotjames