REBOL Trello Interface

Introduction

This is a basic REBOL inteface to Trello.

Works well with Rebol 2 as far as I've seen (in an ad-hoc manner). Generally works with Rebol 3, however it may depend on the Rebol 3 version you are running. If you're using it ad-hoc, use Rebol 2.

Known issues with Rebol 3:

result: trello/search/get [query {description:"path!"}]
bug: (result/options/terms/1/text = "description%3A%22path%21%22")

Notes:

Usage

Look at the documentation contained within trello.r comments first. There's not much you need to do to start using it. Second have a look at trello-test-app.r which is really just a way to manage the token so as to make getting started easier. It contains a number of examples.

Example:

me: trello/member/get "me" none
print ["Full Name: " me/fullName]

To try it:

do http://codeconscious.com/rebol-scripts/trello-test-app.r

You'll need to modify the configuration file it creates with your secret api-key which you obtain from Trello and then re-run the script. The configuration file is dropped in the current Rebol folder.

Scripts

The above two scripts refer to others which are available at the same site path - see the SCRIPT-NEEDS block in the above scripts.

Note that a patched version of HTTP is needed for PUT, DELETE operations in Rebol 2. Graham Chiu has one and I have one that I modified from his. The script will call this automatically for Rebol 2.

Also of note

rowsets.r may be useful in querying the results returned from Trello. Eg.:

script-needs [%rowsets.r]

boards: trello/member/boards/get me/id [filter open]

print mold rowset/query [
    select [id name]
    from-objects b boards
]

Behind the scenes

To develop this interface I first download the Trello API documentation and parsed into a REBOL format that I could use for code genearation.

For programmatic use, you could do a simpler interface to Trello than what I have here. However this basic interface should be complete list of the Trello API (at least at the time I downloaed it). I purposely left all API calls in to capture the fact that similar API calls may not return exactly the same results.