first pass at generic .api endpoint
updates based on code review
add in unit tests
remove verbose output message
variable tidy
update api protocol to api(action, options) and api(action, options, data)
updates, based on code review
DEV-754 Generic .api endpoint for implementing new endpoints in library