Api base.

After reading #104 I was seduced by the idea.

I'm not a js guru and this code have to be improved a lot (new preset, some easy-to-uses functions...) but I create this PR before continues in order to know if this little base is good or if I should change it.