Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Modules

Modules make KRL programming easier. KRL has a powerful parameterized module facility. 

In this lesson, we're going to explore how modules can be used to wrap an external API and make it available inside a pico. 


## outline

  1. Create a ruleset to serve as our module called twilio
  2. write a function that makes an HTTP POST to send an SMS with credentials hard coded
  3. write ruleset to test it
  4. pull credentials into keys pragma. Still not great. 
  5. Use module configuration to get keys out of module and into testing ruleset
  6. use key module to get keys out of testing ruleset.