chore(api): Convert resource handlers to classes instead of closures