The API manual comes with many examples of various calls in all existing program languages as well as a list of all possible results or errors.