I just fixed a few bugs on that api.dart file (along with a few others). The app is hopefully working now, so it should be a better reference