Not a member yet? Why not Sign up today
Create an account  

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Haxus, can we get Galactic chat exposed on an API endpoint?

#1
Hey Haxus,

I was wondering if we could get Galactic chat exposed on an API endpoint?  I'd like to build a bot that would post messages sent to Galactic ingame into Discord and would rather not have to scrape the HTML from http://hazeron.com/galactic.html

It'd be *really* nice if we could get Discord be able to post back to Galactic if someone replies to the bot, but I could understand if that's a hard no.

Hey Haxus,

I was wondering if we could get Galactic chat exposed on an API endpoint?  I'd like to build a bot that would post messages sent to Galactic ingame into Discord and would rather not have to scrape the HTML from http://hazeron.com/galactic.html

It'd be *really* nice if we could get Discord be able to post back to Galactic if someone replies to the bot, but I could understand if that's a hard no.

As a suggestion, you could add http://hazeron.com/galactic.json with the same data as the HTML and have it formatted like this:


{
  "messages": [
    {
      "galaxy": "Shores of Hazeron",
      "player": "Captain Obvious",
      "message": "This is a test message.",
      "timestamp": "2019-05-31T03:07:23Z"
    },
    {
      "galaxy": "Shores of Hazeron",
      "player": "Deantwo",
      "message": "Please call me Danetwo from now on.",
      "timestamp": "2019-05-31T03:07:40Z"
    }
  ]
}

Thanks!
Reply

#2
You can use http://hazeron.com/galactic.html
That was made for such, but I never got around to using it.
Hazeron Forum and Wiki Moderator
hazeron.com/wiki/User:Deantwo
Reply

#3
Yeah I know, it's just bad juju to parse HTML to extract data as every time the HTML changes (like if Haxus updates the site) it'll break.
Reply

#4
I would also love a simplified version of playerson.html.
Maybe Avatars.html and AvatarsByEmpire.html too.
Could even do so for the blueprint exchange pages.
Hazeron Forum and Wiki Moderator
hazeron.com/wiki/User:Deantwo
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)