24 April 2012
As part of the RIDLR project I was asked to start looking into the learning registry API and start to think about how it would be able to interact with DLMs.
I started off by looking at a couple of guides on the learning registry site to get an overview of the API. After quickly getting confused it seemed a better idea would be put some of the examples to use. To do this I put together a very simple project using the python framework django.
I started by creating a python virtualenv and installed the following components.
Once the environment was set up I was able to create a simple search interface using the Learning Registry obtain and slice services.
Both services return JSON, which is then parsed and displayed via a simple template. One thing worth noting here is that the inline resource data contained in ‘resource_data’ (resource metadata/paradata) can be in any format e.g. JSON, XML, string. Which means if like me you try and parse it all as one format it’s not going to work for all resources (as I found switching from the mimas node to the sandbox node).
With a simple search interface working I moved on to looking at publishing a resource to a node. In order to test this I used the example JSON object from the learning registry site, adding a tag ‘ridlr’ so I could keep track with my slice call.
The publish code created takes the JSON object, signs it using the LRSigniture package and posts the signed object to the node. If the object is successfully published a ‘obtain’ is performed on the resource.
The sample django project is available at https://github.com/jamesoutterside/ridlr-learning-registry
There are quite a few areas I haven’t had a chance to experiment with yet such as publishing paradata and activity streams. Hopefully I will have some time in the coming weeks to have another look and add to the github project.
Related tags: API, Django, jlern, learning registry, oerri, python, rapid innovation, RIDLR, ukoer
Posted by: James Outterside
Posted in: OER rapid innovation: RIDLR