Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Inside API.Leipzig

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Inside API.Leipzig

Avatar for Benjamin Knofe

Benjamin Knofe

April 17, 2012
Tweet

Other Decks in Technology

Transcript

  1. Inside API.Leipzig 17. April 2012 - Leipzig on Rails -

    sublab Ben(jamin Knofe) @videosynthesis http://www.videosynthesis.net/
  2. * seit Dezember 2011 * 30 > 10 > 5

    Beteiligte * 145 angemeldete Nutzer * 8309 requests/33 aktive Nutzer im März
  3. * 1 Server (HE VServer L) * nginx 1.1.13 +

    passenger 3.0.11 * mySQL 5.0.51a * 3 Apps + Frontpage * MIT / CC-BY
  4. curl -i -X GET http://www.apileipzig.de/api/v1/calendar/events HTTP/1.1 403 Forbidden Content-Type: text/javascript;charset=utf-8

    Content-Length: 40 Connection: keep-alive Status: 403 X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.11 X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Server: nginx/1.1.13 + Phusion Passenger 3.0.11 (mod_rails/mod_rack) {"error":"No permission(s) to do this."}
  5. curl -i -X GET http://www.apileipzig.de/api/v1/calendar/events -d 'api_key=psewqGJMryqsrzrcALa' HTTP/1.1 200 OK

    { "data": [ { "venue_id":10, "id":1, "updated_at":"2011-07-04T10:44:47+02:00", … }, … ] }
  6. curl -X GET http://www.apileipzig.de/api/v1/calendar/hosts/24 -d 'api_key=psewqGJMryqsrzrcALa' { "id":24, "first_name":"Leipzig", "last_name":"on

    Rails", "mobile":null, "created_at":"2012-04-17T14:28:33+02:00", "updated_at":"2012-04-17T14:28:33+02:00", "url":null, "phone":null }
  7. curl -X POST http://www.apileipzig.de/api/v1/calendar/events -d 'api_key=psewqGJMryqsrzrcALa' -d 'category_id=2' -d 'venue_id=30'

    -d 'host_id=24' -d 'name=Leipzig on Rails Treffen im April' -d 'description=Immer mit spannenden Vorträgen. Kostenfrei.' -d 'date_from=2012-04-17' -d 'time_from=19:30:00' { "success": { "id":33, "message":"Event was saved with id = 33." } }