From Usability Net
The Wizard of Oz technique enables unimplemented technology to be evaluated by using a human to simulate the response of a system.
TheWizardOfApi helps you build Wizard of Oz experiments by providing a human an interface that enables them to create API responses for incoming requests. Keeping with the metaphore, this interface is called the Throne Room. The human operator, or Wizard, observes incoming HTTP requests, and uses a form to create a JSON response document.
Add this line to your application's Gemfile:
And then execute:
In an existing Rack app
Add this to your config.ru file:
require 'the_wizard_of_api' use # Counts on having a run statement
As a stand alone Rack app
Start your config.ru file like this:
require 'bundler/setup' require 'the_wizard_of_api' run .
Having installed TheWizardOfApi to your Rack application, you can now access the Throne Room in your favoured browser at http://localhost:3000/throne
By default, TheWizardOfApi mounts the API request handler at a wild card path starting with /api/. So, requests like
- POST /api/wishes
- GET /api/wish/heart
- PUT /api/dorothy/home
- DELETE /api/witches
are satisifed by TheWizardOfApi. You can customize the mount point in your Rackup file like so:
use , mount: "/kansas"
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request