Oshuma / api_faker

Simple Merb app to fake (and test) arbitrary web APIs.

Home Page:http://oshuma.github.com/api_faker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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>

About

Simple Merb app to fake (and test) arbitrary web APIs.

http://oshuma.github.com/api_faker/


Languages

Language:Ruby 83.0%Language:JavaScript 17.0%