update API

use https
add doctest
add new API options
add new returned key
API now prefixes errors with “error_”
update readme