add api
add api test
Merge pull request #4 from darkleaf/master

add api