Author Topic: Dave's Galaxy  (Read 538767 times)

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Dave's Galaxy
« Reply #1215: November 06, 2011, 05:18:33 PM »
There was a player a while back who wrote some scripts in Ruby that scraped his planet info, and did some routine maintenance stuff for him.  I should make an API, I know there are several people who'd just love the ability to automate stuff.  I think it would also be cool to allow other people to write games that could use the Galaxy as a backdrop (huge pipe dream that...)

You're already doing lots of AJAX to fetch all the data. The major change you'd need is that the AJAX reply is not ready HTML, but raw data, i.e. IDs, names, etc. in JSON format (which you also already use) and a small piece of javascript creates the HTML table out of that. Then you could expose that JSON interface as an API easily.