APIbunny challenge launched by 3scale for Easter 2014
JavaScript CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
public
views
.gitignore
README.md
config.js
fortune.js
fortune_init.js
index.js
mazes.js
package.json

README.md

APIbunny

APIbunny was launched on Friday 18th April 2014 to celebrate Easter in a geeky manner. Hackers were asked to solve a maze using an Hypermedia API to claim a prize.

Find the whole story on 3scale blog

Project by @picsoung from 3scale supported by APItools using Fortune.js and JSONAPI inspired by Mike Amundsen's book RESTful Web APIs

Live Demo

http://apibunny.com

Dependencies

How does it work

Maze data are stored in /data folder. fortune_init.js launch the API with no restrictions mazes.js reads the info from maze data file and call the API to create the maze in database fortune.js launch the protected version of the API.

By default we use nedb check the Fortune.js documentation to change it.

Databases are stored in /node_modules/data/db/maze-data

Config

To track calls in the API we use Keen.io Analytics API. In config.js you will need to add your Keen.io keys to make it work.

You will also have to change privateKey variable to your own, it's used to generate a hash when users have finished the maze.

In this config file you can also configure the baseUrl of your API or the port where it will be available.

Install

git clone https://github.com/picsoung/apibunny.git
cd apibunny
npm install
node fortune_init.js

in another terminal to create the maze

node mazes.js

Kill init and launch the "protected" version

node fortune.js

Clients

In the community people have built their own client, thanks to them for sharing