Global Constant
Steve Nay's ramblings

A KRL module for StringBin

UPDATE: This module is now listed in the Kynetx module directory. Check it out here.

This morning I wrote my first KRL module. If you remember from February, Sam Curren wrote a Google Calendar module that I used in my own Kynetx app for CS 462. Sam has since written the entire Kynetx Twilio functionality as a module. I’ve had some ideas brewing for modules I’d like to write. So I started today with a really simple one: StringBin.

StringBin is a service that Mike Grace wrote a while ago. It basically lets you store key-values pairs. That’s it. There are two endpoints in the API: read and write. Both are accessed via GET.

Writing a module for this is really simple. I just needed to provide two functions (read and write) that take the correct arguments. Here’s what the module code looks like, including the tests that are embedded in the ruleset:

Importing the module into another ruleset is as simple as entering your StringBin PIN in a key block and then including this in the meta block:

use module a163x63 alias stringbin with stringbinkeys = keys:stringbin()

Here’s what it looks like in a full ruleset:

Feel free to use this module and let me know what you think of it!

Later article
TomatoFlix