public
Description: Simple Merb app to fake (and test) arbitrary web APIs.
Homepage: http://oshuma.github.com/api_faker/
Clone URL: git://github.com/Oshuma/api_faker.git
Click here to lend your support to: api_faker and make a donation at www.pledgie.com !
Dale Campbell (author)
Sun Feb 15 19:57:18 -0800 2009
commit  f6d5089732f6f1ad655350f3accf7c5a47e9af9d
tree    e9935bd3b8e23565034a6c4f3b59c8223dc51a58
parent  e6ad3239bebc5c385475c9257c26e88d4db1a18d
README
API Faker
---------

This app was born from my need to test web API responses without having to actually send
a request through the tubes.  Just create a new Detail, select the content type, and
give it some guts.  You can also give it a remote URL and it will fetch the data and
cache it locally.  The URL is saved as well, and there's an update link on the details
page which will allow you to fetch (and cache) the latest data from the URL.

You'll then be able to RESTfully test the response and not have to worry about some lame
API limit (*ahem* looks at Twitter).

Currently supports JSON, XML and YAML.


Example
-------

$ curl http://localhost:4000/details/666.json
{
  "animals": {
    "dog": [
      {
        "id": 666,
        "name": "Cerberus",
        "breed": "hellbeast"
      }
    ],
    "cat": {
      "name": "Kamichu"
    }
  }
}

$ curl http://localhost:4000/details/420.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
  <book awesome="true">
    <title>The Ruby Programming Language</title>
  </book>
  <book awesome="false">
    <title>PHP For Little Girls</title>
  </book>
</books>