added main file with api impl
added tests in curl
using generic json encoding
Merge branch 'initial'