Generate Javascript methods that correspond to API endpoints