Introducing GroovyRTM: A Groovier way to Remember The Milk

I have always wanted to give something back to the wonderful creators of the Remember The Milk to-do list service. It has been a great tool for me the past couple years by helping me keep organized. Thank you, RTM crew!

Over the last couple months I’ve been taking a bit of spare time to write something that I hope all of us can benefit from: GroovyRTM

What is GroovyRTM?

GroovyRTM allows you to easily take advantage of the Remember The Milk REST API using any language on the JVM. In short, you can now write apps for Remember The Milk without having to worry about all the HTTP transaction stuff, error handling, etc. As its name implies, it’s written in Groovy, which made it much easier to write and test. Remember The Milk + Groovy = GroovyRTM

How can I use it?

To get started, you’ll need 3 things:

  1. Download groovyrtm-all.jar from the project on GitHub
  2. Request an API key (you’ll probably want an RTM account to test it with, too)
  3. Create a RtmService.properties file as explained in the project Wiki

UPDATE: I’ve created a quick-start project that has everything you need to get started quickly! I included an application authorization example because that’s the first hurdle. Download it here

Just how easy is it? Suppose you want to write a little Java app that adds a new task:

import org.eriwen.rtm.*;

class MyGroovyRtmTest {
    public static void main(String[] args) {
        GroovyRtm rtm = new GroovyRtm("api-key", "shared-secret");
        rtm.testEcho();
    }
}

It’s that easy! Now, it’s a little deceiving because the first time your app runs you have to allow it access via the RTM website. The best part is… it’s open source! You can check out the source with Git:

git clone git://github.com/emwendelin/groovyrtm.git

Awesome! Can I help?

Of course! Get the code, give me suggestions, use it and tell me what you think. I am willing to add people to the project that show me their interest and some good Groovy code. Just hit up the issue tracker or use my contact form for questions or suggestions.

If you think it’s cool but you can’t use it, help me get it out there by digging it or voting on your favorite aggregator.

If you liked this post, please help me share it

Responses (9)

  1. kodeninja says:

    Here’s my (groovy_home)/lib/RtmService.properties file:

    api.auth.url.base=”http://www.rememberthemilk.com/services/auth/”
    api.url.base=”http://api.rememberthemilk.com/services/rest/”
    api.encoding=”UTF-8″
    api.key=”my-key”
    api.perms=”delete”
    api.sharedsecret=”my-secret”
    api.delay=1000
    logging.level=DEBUG

    -Kodeninja

    • You’re properties file isn’t in the correct location. By default, I look for the config file in $GROOVYRTM_DIR/config/RtmService.properites. If I don’t find it there, I look in $GROOVYRTM_DIR/

      What might make things easier for you is instantiating RtmService like so:

      RtmService groovyrtm = new RtmService(‘your-api-key’,’shared-secret’)
      groovyrtm.testEcho()

      You don’t even need a config then. Check out the groovydocs at http://eriwen.com/groovyrtm/javadoc/ to see what’s available :)

  2. kodeninja says:

    Just to add to the previous post, when I call testLogin() after a successful call to testEcho() , it throws the following exception:

    org.eriwen.rtm.RtmServiceException: Login failed / Invalid auth token

    -Kodeninja

  3. Ken Yagen says:

    Eric,

    Have you taken a look at iBeans? It’s right up the same alley as GroovyRTM. a RTM iBean would be simple to create to accomplish the same goals (for webapp use). Would love your feedback on the usefulness of iBeans for solving this type of problem.

    http://www.mulesoft.org/display/IBEANS/Home

    Ken

    PS if you create a RTM iBean and submit it, let me know and I’ll make sure you are sent an cool iBeans fleece.

Leave a Reply