Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added an exercise section as included in the 462 material here: https://byu.instructure.com/courses/617/assignments/19189

...

We now have a Twilio module that wraps the Twilio API in functions and actions that are more convenient for KRL rulesets to use. We've also taken steps to protect sensitive keys while making their use convenient.

As always, it is a good idea to test your code during development.

Exercises

  1. Sign up for a developer account at Edmunds
  2. Generate a key.
  3. Create a key module with the Edmunds key 
  4. Create an Edmunds module that uses the key module created above and contains a function that wraps the Edmunds VIN Decoding API:
    1. The function should take a VIN as it's argument
    2. The function should return a JSON object containing the vehicle make, model, years, and city and highway mileage. (use http:get() with parseJSON = true)
  5. Write a ruleset to use and test your Edmunds module by calling the function and returning the results as a directive from a rule. You can test it with real VINs from cars you have access to, or use RandomVIN.

Note: The Edmunds API has a limit of 25 calls per day. You can request an upgrade, but that can take a few days, so plan accordingly.