$30 off During Our Annual Pro Sale. View Details »

Build A RESTful API in Go

Build A RESTful API in Go

Build a RESTful API that controls a Sphero (http://www.gosphero.com/). Source code is here: https://github.com/jingweno/gundam

Jingwen Owen Ou

February 05, 2014
Tweet

More Decks by Jingwen Owen Ou

Other Decks in Programming

Transcript

  1. Build a RESTful API in Go
    Owen OU
    @JingwenOwenOu
    https://github.com/jingweno

    View Slide

  2. Sphero
    • A robot ball (http://www.gosphero.com/)
    • Go binding: http://gobot.io

    View Slide

  3. An endpoint to Sphero
    • `curl -X PUT localhost:3000/rgb/255,0,0` =>
    change Sphero’s colour to red
    • TDD an endpoint using Go standard library
    • TDD an endpoint using Martini and Assert
    • https://github.com/codegangsta/martini
    • https://github.com/bmizerany/assert

    View Slide

  4. Source
    • https://github.com/jingweno/gundam
    • $ git checkout api

    View Slide

  5. Q&A

    View Slide