HearthStats / HearthStats.net-Uploader

Auto uploader for HearthStats.net
BSD 3-Clause "New" or "Revised" License
123 stars 57 forks source link

Stats output to text file #55

Closed sargonas closed 10 years ago

sargonas commented 10 years ago

Tri suggestion I pass on to you this idea:

Us streamers love to show stats on our overlay. With the new API on HearthStats.net I could write a simple program that pulls my API data to a text file, and then let my streaming software pull the text from the file into my overlay. However it might be more elegant, long-term, to add this functionality directly into the scanning app to limit moving parts.

Ideally, the uploader could poll the API for data when there is a change, and output all of your stats (or a subset based on selected config settings?) into a text file. Programs like XSplit and OBS can read entire files, or data set between customizable start/stop fields, so ideally each stat should be on it's own line encapsulated between a type container so that you can pick and choose which lines to read into your overlay.

Obviously not a high priority, but a solid feature once the core functionality works.

JeromeDane commented 10 years ago

I like this idea a lot. I'll look into it eventually

JeromeDane commented 10 years ago

Could I get some more information on exactly what is needed and in what format? I'm getting close to putting something like this in place.

sargonas commented 10 years ago

Given that the top two streaming applications (OBS and Xsplit) can read in from multiple positions within a plain text file using markers, I would suggest the following based on my own personal needs:

Casual Wins [con] 50-50 (50%) [/con] Ranked Wins [ranked] 50-50 (50%) [/ranked] Arena Wins [arena] 50-100 (30%) [arena] Current Arena [currArena] 6-2 [currArena]

those are the most pertinent stats I can think of at the moment, and the ones I would most want to share. We could in theory do without the first part ("Casual Wins" etc) but it helps make the file human readable so you know what to point to. This format should also be easy to add more as needed.

trigun0x2 commented 10 years ago

I think this would be more of a task on my end? The app just has to make a request for new data after each game. On Feb 5, 2014 10:11 PM, "J Eckert" notifications@github.com wrote:

Given that the top two streaming applications (OBS and Xsplit) can read in from multiple positions within a file using markers, I would suggest the following based on my own personal needs:

Casual Wins [con] 50-50 (50%) [/con] Ranked Wins [ranked] 50-50 (50%) [/ranked] Arena Wins [arena] 50-100 (30%) [arena] Current Arena [currArena] 6-2 [currArena]

those are the most pertinent stats I can think of at the moment, and the ones I would most want to share. We could in theory do without the first part ("Casual Wins" etc) but it helps make the file human readable so you know what to point to. This format should also be easy to add more as needed.

Reply to this email directly or view it on GitHubhttps://github.com/JeromeDane/HearthStats.net-Uploader/issues/55#issuecomment-34288217 .

JeromeDane commented 10 years ago

Yes @trigun0x2, I think it would be easiest if you just give me an API call I can make that returns the standard json response with data:[text file output including newlines]

trigun0x2 commented 10 years ago

@JeromeDane I'm not sure if I should make it in text form because other applications may also use the API in the future. Chances are I'll return a JSON object which the app will have the process again.

JeromeDane commented 10 years ago

I want JSON returned. :-)

All API requests should definitely return JSON including status and data properties just like give been doing

trigun0x2 commented 10 years ago

Sounds good. Actually the current api has some things you can test with right now:

http://beta.hearthstats.net/api/v1/arena_runs/show?userkey=xxxx
http://beta.hearthstats.net/api/v1/arenas/show?userkey=xxx

On Thu, Feb 6, 2014 at 12:07 PM, Jerome Dane notifications@github.comwrote:

I want JSON returned. :-)

All API requests should definitely return JSON including status and data properties just like give been doing

Reply to this email directly or view it on GitHubhttps://github.com/JeromeDane/HearthStats.net-Uploader/issues/55#issuecomment-34345592 .

Jeffrey Tong / Student / Programmer / Chemical Engineer

1-519-722-8530 / http://www.extra.io

[image: Twitter] https://twitter.com/sBerryCake [image: Linkedin]http://ca.linkedin.com/in/jefft0ng/

This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Jeffrey Tong is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company.

trigun0x2 commented 10 years ago

Sounds good. Actually the current api has some things you can test with right now:

http://beta.hearthstats.net/api/v1/arena_runs/show?userkey=xxxx
http://beta.hearthstats.net/api/v1/arenas/show?userkey=xxx
tyrcho commented 10 years ago

@trigun0x2 can we close this ? (I'm reviewing quickly all issues ...)

trigun0x2 commented 10 years ago

Yea, it doesn't really belong here. It's more of a TwitchBot that needs to be made. Closed.