Quantcast WoW to REST Service - WoWInterface
 
Thread Tools Display Modes
09-18-15, 04:17 AM   #1
cFx
A Murloc Raider
 
cFx's Avatar
Join Date: Sep 2015
Posts: 5
WoW to REST Service

Hey

I read the http://www.wowinterface.com/forums/s...ad.php?t=42367 thread and there stood, that it`s not possible for wow addons to access anything outside WoW, but Im kinda curious how all the data driven sites have managed to post data to web services/ web apps.

Currently I haven`t got any XP in LUA/WoW-Dev, but would like to start an personal project for learning purposes. I want to create an Addon for posting the players current battleground-status in real time to an REST service.

So when queuing for AB it enters the player data into an db and when Im out of the BG it should delete the db entry. The information should be stored in an JSON/XML-File and whenever the bg-status changes it should execute the post/update on the DB on the RESTful service.

The real time communication is very important here and I would like to know which ways of communicating to a web service are available, so I could directly dive in and create a solution.

Would appreciate some help in how this could be managed.
  Reply With Quote
09-18-15, 07:21 AM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Originally Posted by cFx View Post
Hey

I read the http://www.wowinterface.com/forums/s...ad.php?t=42367 thread and there stood, that it`s not possible for wow addons to access anything outside WoW, but Im kinda curious how all the data driven sites have managed to post data to web services/ web apps.
You mean like Wowhead? Afaik (as well as it being the only legal way) they run an addon which collects data and writes it to saved variables. They then use an external application that reads the saved variables file and upload it to Wowhead.

Saved variables can only be written to when the UI "unloads", that is when you reload UI or log out. There's no allowed way to export data out of the game in real time.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
09-18-15, 07:50 AM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
It's also possible to pull a lot of data out of the game's own data files, which I'm sure Wowhead and the like do.

If you're talking about sites that show player profile info, they're pulling it from the official Battle.net API:
https://dev.battle.net/

However, neither of those will provide you with any way to export arbitrary data from in-game in real-time. That's simply not allowed, by design.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addon Turn any code into an addon More addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please dont PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
09-18-15, 08:07 AM   #4
cFx
A Murloc Raider
 
cFx's Avatar
Join Date: Sep 2015
Posts: 5
Yeah, I was thinking about Worldoflogs,wowhead, etc. ... Was hoping for a function for creating a log-file, which get`s edited without ui reload/log out =/

But thx for the answers/help =)
  Reply With Quote
09-18-15, 08:14 AM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The combat log, like most other built-in logs, doesn't require a UI reload or logout to be written out to disk, because the game has total control of what's written to it. You can't write arbitrary info to the combat log.

However, you'll note that chat logs aren't written out in real-time.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addon Turn any code into an addon More addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please dont PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
09-18-15, 01:08 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,918
Originally Posted by cFx View Post
Yeah, I was thinking about Worldoflogs,wowhead, etc. ... Was hoping for a function for creating a log-file, which get`s edited without ui reload/log out =/

But thx for the answers/help =)
Even if these sites use addons to record data, they require registered users to submit data files for parsing after the fact. None of these sites work on real-time data. Even if there was a way to access the file system in real-time, this would be an easy attack vector for automation bots, which Blizzard is adamant against.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
09-19-15, 03:27 AM   #7
cFx
A Murloc Raider
 
cFx's Avatar
Join Date: Sep 2015
Posts: 5
Jepp, after rethinking it would be obviously an easy access-method to create advantages, sad but true =/
  Reply With Quote
09-19-15, 05:20 AM   #8
cFx
A Murloc Raider
 
cFx's Avatar
Join Date: Sep 2015
Posts: 5
Okay,

I got another solution idea, which shouldn`t be "illegal" :

So I would think about creating an Addon, which makes screenshots whenever an defined InGame Event happens. So

For example:

Player A queues for AB, the addon creates an screenshot of that event. The image is getting named ab_queue.jpg. So the image get`s saved in real-time. Also the Addon should provide some sort of signals, for example if a battleground pops a green signal appears. Therefore the green signal appears on the screenshot.

Than I have a program running in the background which watches the screenshot directory for the event_named screenshots (ab_queue,ab_pop,ab_leave,wsg_queue,wsg_pop,etc. ). If such an event with the addon-signal get`s captured, it takes this screenshot and processes it with some sort of image processing library to search and interpret the signals of the addon and if it has finished the interpretation, it loads up the data to my REST service. As I only need simple signals, it could be achieved through an addon with a total of 9 different signals (just want to have ab,wsg and av)

So my questions related to the WoW Addon API would be:

I read that it`s possible to shoot screenshots via an addon, but it`s also possible to name the screenshots? And if not, could I tell the Addon where the Screenshots should be stored? Like in an sub-folder of the screenshot folder?

Would appreciate your help again =)
  Reply With Quote
09-19-15, 12:24 PM   #9
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,727
Again, stuff that happens in real time is locked down tight. The game saves screenshots to the Screenshots folder - and that folder only - and names them based on the date/time they were taken - you can't give them custom names.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » WoW to REST Service

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off