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

REST API for Likes

REST API for Likes

REST API basic principles re-explained and some edge cases including soft-deletes and likes on resources. Presented for the first time at internal company conference during #mwlretreat.

Hannes Van De Vreken

September 30, 2014
Tweet

More Decks by Hannes Van De Vreken

Other Decks in Programming

Transcript

  1. REST BASICS - SOAP <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/…" soap:encodingStyle="http://www.w3.org/2001/…"> <soap:Body

    xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
  2. REST BASICS - HTTP METHODS - UPDATE PUT /users/andreascreten HTTP/1.1

    Host: api.github.com ! { "login": "andreascreten", "id": 4200, "avatar_url": "https://avatars.gith…", "email": "[email protected]", …
  3. REST BASICS - HTTP HEADERS - RATE LIMIT HTTP/1.1 429

    Too Many Requests X-RateLimit-Limit: 60 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 1377013266
  4. CASE STUDY - INSTAGRAM - LIKED? GET /v1/media/4b292…/likes HTTP/1.1 Host:

    api.instagram.com ! { "data": [ { "username": "andreascreten", "id": "206389", …
  5. • http:/ /wikipedia.org/wiki/SOAP • http:/ /myri.se • http:/ /meetup.com/mongodb-belgium •

    http:/ /mwl.be • http:/ /shop.oreilly.com/product/0636920028468.do • https:/ /dev.twitter.com • http:/ /instagram.com/developer • https:/ /developer.github.com • https:/ /developer.foursquare.com REFERENCES