f8p gets live APIs

February 28, 2006 · 0 comments

Just finished the XMLPRC and REST APIs for f8p.

Being my first live implementations of either type of API, I learned quite a bit.

The XMLRPC was a breeze since foundation is already baked into Rails. Figuring out how to piggyback REST on top of it was a bit more challenging.

  1. The methods are:

Create Link expects a “path”, like http://speedymac.com

Find Link expects the link “id”, like 7vkkxg

Find Uses From Link expects the link “id”, like 7vkkxg

  1. XMLRPC resides at:
  • http://fp8.com/backend/api
  1. REST calls are as follows:
  • http://f8p.com/backend/create_link
  • http://f8p.com/backend/find_link
  • http://f8p.com/backend/find\_uses\_from\_link

All responses should be well-formed xml.

  1. Usage examples:
  1. REST

    curl -d path=’http://speedymac.com’ -X POST http://f8p.com/backend/create_link

    < ?xml version=”1.0” encoding=”UTF-8”?> http://f8p.com/e1gdd1

    curl -d id=’e1gdd1’ -X POST http://f8p.com/backend/find_link

    < ?xml version=”1.0” encoding=”UTF-8”?>http://speedymac.com

    curl -d id=’e1gdd1’ -X POST http://f8p.com/backend/find_uses_from_link

    < ?xml version=”1.0” encoding=”UTF-8”?>5

  1. XMLRPC

    curl -d ‘< ?xml version=”1.0” ?>CreateLinkhttp://speedymac.com’ -H “Content-Type: text/xml” -X POST http://f8p.com/backend/api

    < ?xml version=”1.0” ?>http://f8p.com/e1gdd1

    curl -d ‘< ?xml version=”1.0” ?>FindLinke1gdd1’ -H “Content-Type: text/xml” -X POST http://f8p.com/backend/api

    < ?xml version=”1.0” ?>http://speedymac.com

    curl -d ‘< ?xml version=”1.0” ?>FindUsesFromLinke1gdd1’ -H “Content-Type: text/xml” -X POST http://f8p.com/backend/api

    < ?xml version=”1.0” ?>5

0 responses so far ↓

  • There are no comments yet... Kick things off by filling out the form below.

Leave a Comment