All we're doing right now is pinging, but it should be fairly simple to get an API working now that the browser and interface can talk.
I'm finding that this code is being used multiple times, so inheritance seems to be warranted.