praekelt/vumi-go — pull request #334 by hodgestar (2013-06-11 15:45:53+00:00)
Title: Add routing table retrieval and updating functions to Go API.

This is needed by the routing table jsPlumb UI. We need at least a method for:

* Retrieving the routing table and channels, routing blocks and endpoints.
* Saving an updated routing table (and validating it).

Example JSON for routing table retrieval:

```javascript
var routing = {
campaign_id: 'campaign-1',
channels: [{
uuid: 'channel-uuid-1',
tag: ['apposit_sms', '*121#'],
name: '*121#',
description: 'Apposit Sms: *121#',
endpoints: [{uuid: 'endpoint-uuid-1', name: 'default'}]
}],
routing_blocks: [{
uuid: 'routing-block-uuid-1',
type: 'keyword',
name: 'keyword-routing-block',
description: 'Keyword',
channel_endpoints: [{uuid: 'endpoint-uuid-2', name: 'default'}],
conversation_endpoints: [{uuid: 'endpoint-uuid-3', name: 'default'}]
}],
conversations: [{
uuid: 'routing-block-uuid-2',
type: 'bulk-message',
name: 'bulk-message-1',
description: 'Some Bulk Message App',
endpoints: [{uuid: 'endpoint-uuid-4', name: 'default'}]
}],
routing_entries: [{
source: {uuid: 'endpoint-uuid-1'},
target: {uuid: 'endpoint-uuid-2'}
}]
};
```