05-31-2019, 06:29 AM
(This post was last modified: 05-31-2019, 06:35 AM by CaptObvious.)
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!
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!