Add basic API usage information to README

This adds some basic API information to the README file, which didn't have any documentation about the API before. Some parts are copied from the wiki.