Rough guess at what API calls will look like.
Move api to own file and use slightly ligter weight object-literal syntax