feat(api): move API to a class using Sinatra::Base