API

Legoat data exchange
  • REST interface definition
  • how to access service
  • technological background
  • example

We provide simple way how to connect your application to our LEGO® building instruction repository. Legoat.com provide public REST interface. You can connect you application to this REST interface and load any data that you need for you application as it's shown at next picture.

LEGO API communication diagram

Example app

Example application is at http://sourceforge.net/projects/legoat/. There is public free CVS repository, where you can download example application. This application connect to legoat server and allows to browse through all LEGO building instruction from java.swing application.

Used technologies

JSON
simple data exchange format based at simple notation, see specification json.org.
Java JSON Tools
Project for parsing POJO object into JSON and back. This library is used in our examples. See project page.
JSONP - JSON with Padding
Simple JSON extension that allows to create cross-domains AJAX application. It allows to avoid Same-Origin security restriction. If you want to use JSONP just add to any URL at legoat.com REST interface padding name like CallBack=paddingName
REST
powerful way how to hierarchically organize application resources into humans friendly way. With connection with HTTP it easily make public all data resources. See REST at wikipedia.org.