User Pass
Home Sign Up Contact Log In
Page:
 
Corndog
Admin
offline
Link
 
So, I've been thinking it might be worthwhile to include an API link that scripters can use to easily pull information from a page, and in a minimialistic fashion.

Is this worthwhile, and if so, what pages and information?

Examples:
http://glb2.warriorgeneral.com/game/game/34796/json?type=pbp - All plays from a game in json
Edited by Corndog on Mar 21, 2014 19:22:58
Edited by Corndog on Feb 4, 2014 16:43:06
 
pabst
offline
Link
 
To be honest, unless you've got a particular use in mind like enabling people to write an Android/iPhone app or some crazy Facebook widget, it's probably not worth the effort just for us greasemonkey geeks. While it would make a lot of things easier, most of what I write is just filling in the holes in the site. Fix the holes (like the dearth of statistics-porn), and the API becomes irrelevant.

The only thing I could see it being really useful on is scouting. Allowing us to get the data for a full game in one shot rather than downloading play, after play, after play would definitely help the server out when someone writes a scouting script. This of course assumes that someone is willing to write a monsterkill style scouting app. I'm not ready to go that far yet, though it looks like Thunderoo may be trying.

 
bdnannac
offline
Link
 
I can't get his to work.
 
Corndog
Admin
offline
Link
 
Originally posted by pabst
To be honest, unless you've got a particular use in mind like enabling people to write an Android/iPhone app or some crazy Facebook widget, it's probably not worth the effort just for us greasemonkey geeks. While it would make a lot of things easier, most of what I write is just filling in the holes in the site. Fix the holes (like the dearth of statistics-porn), and the API becomes irrelevant.


Not everyone wants every bit of information vomited on their screen at all times, though.
 
Thunderoo
offline
Link
 
Would obviously love something like this but agree with pabst that unless it's relatively simple for you guys it probably isn't worth the effort.

But I do want to reiterate that I would use and like an API! Tbh seeing what was in it will probably inspire more scripts etc that are hard to envisage with the data hidden away.
Edited by Thunderoo on Feb 5, 2014 02:40:22
 
peeti
offline
Link
 
Originally posted by Corndog
Not everyone wants every bit of information vomited on their screen at all times, though.


No, but especially for "stats", as Pabst was mentioning, you didnt really adress what (IMO) the majority is looking for. I loved the Greasemonkey Heroes on GLB and hope they will jump in here as well

 
DevilzSoundz
offline
Link
 
I would love to have this. If an API was available, that I could pass in a replay ID, and could get the game information in XML format, it would make life very easy. The information Thunderoo pulls from his current script would be great starting place. The extra pieces that I would like to see included, that he can't find on the page right now, is Field position on each play, as well as the offensive and defensive formations (currently, he calculates the def formation from players positions)

I am thinking very basic and standard xml, with no need for a defined schema(xsd) to check against, etc

<Game>17543</Game>
<GameOpponents>
<HomeTeam>Team 1</HomeTeam>
<VisitingTeam>Team 2</VisitingTeam>
</GameOpponents>
<PlayByPlay>
<Play 1>
<Parameters>
<Quarter>1</Quarter>
<Time>14:51</Time>
<FieldPosition>Offense</FieldPosition>
<FieldYardLine>20</FieldYardLine>
<Down>1</Down>
<Distance>10</Distance>
</Parameters>
<Offense>
<TeamName>Team 1</TeamName>
<Formation>Strong I Formation</Formation>
<Play>HB Counter Weak</Play>
<WRCount>2</WRCount>
</Offense>
<Defense>
<TeamName>Team 2</TeamName>
<Formation>4-3</Formation>
<Play>Cover 2 Man Under</Play>
</Defense>
<Result>
<Yardage>3</Yardage>
<Turnover>0</Turnover>
<Description>QB Ball Handler handed off to HB The Original for a 3 yard gain.</Description>
<Link>http://glb2.warriorgeneral.com/game/replay/14279/152786</Link>
</Result>
</Play>
</PlayByPlay>
</Game>

This would be for scouting, I could see other API's, like getting a teams schedule(league/ladder, etc, not sure that scrimmages would be worth it) and that would include the replay link, possibly matchup link, etc.

A little more difficult API(security reasons) would be to pull your players personal information (attributes, etc) so you could watch the growth in different ways, and compare certain attribute growths to game performances. Again, this one may be too hard, for very very little gain. I would admit im a regular stat geek

ETA: my formatting didn't keep with XML, so its not as easy to read. you could paste it into an xml editor and it should autoformat correctly.
Edited by DevilzSoundz on Feb 5, 2014 10:50:21
Edited by DevilzSoundz on Feb 5, 2014 10:49:42
 
kjoe51689
offline
Link
 
Here is where I could see it being useful -

Allowing 3rd party creation of android apps, windows apps, iphone apps, ect..
It would allow teams that want to build websites to pull information from your site to include on theirs. For example, new posts for team forum. recent scores on their team webpage, It could grab other random useful things as well.

Doing this would allow for GLB to be relevant on multiple platforms and essentially increase your site development by tenfold just from user based submissions. However, doing this is a great pain in the ass and will ultimately lead to someone screwing something up by abusing the api call system.

As someone who works with API's daily I see great potential in being able to grab data for use in other locations. (Like pabst said, this wont really help with the greasemonkey scripts he is working on, or allowing users to change much with the site itself.) What it does allow is for people to take the data they want and use it in a location they would rather view it. I would love to see a third party app for GLB that allows me to login and view recent team posts, recent game scores, ect.. and get notifications shoved to my system so I don't have to constantly go to the site to check all of these locations.

If you're going to do this though, please make sure you have someone knowledgeable with the way API calls work. The last thing you want is to have someone half ass a system that causes more problems than it creates.
 
lupka
offline
Link
 
An API, even if read-only, would be awesome. I'd like to see something for player data, stats and game replays specifically.

I wrote a little bookmarklet to pull player data, but it'd be awesome if I could be updating that automatically via an API.
 
Corndog
Admin
offline
Link
 
Example of the API that someone requested (all the plays from a single game in json)
http://glb2.warriorgeneral.com/game/game/34796/json?type=pbp
 
a_esbech
offline
Link
 
I'd like information like Play type (Rush/Pass/Special Teams) and yards gained.

This API could be immensely useful.

I'd also like to see an array containing "stats gained", so if QB1 has passed to WR3 for 10 yds, the array will be something like "stats" : {"pass" : {"QB1",10,"yards"}, "receiving" : {"WR3",10,"yards"}, "defence" : {"CB2",1,"tackle"}}

I'm not sure if any of the is possible. (sorry for the poor json syntax)
Edited by a_esbech on Mar 24, 2014 12:57:16
 
Stobie
MoD
offline
Link
 
Originally posted by a_esbech
I'd like information like Play type (Rush/Pass/Special Teams) and yards gained.

This API could be immensely useful.

I'd also like to see an array containing "stats gained", so if QB1 has passed to WR3 for 10 yds, the array will be something like "stats" : {"pass" : {"QB1",10,"yards"}, "receiving" : {"WR3",10,"yards"}, "defence" : {"CB2",1,"tackle"}}

I'm not sure if any of the is possible. (sorry for the poor json syntax)


Your spelling is not excused (had to poke)

FWIW you can derive this info basically from a little cross reference parsing based off the Description provided. Well... at least I am to an extent in my scouting program that I am building.
 
a_esbech
offline
Link
 
Originally posted by Stobie
Your spelling is not excused (had to poke)

FWIW you can derive this info basically from a little cross reference parsing based off the Description provided. Well... at least I am to an extent in my scouting program that I am building.


Yeah, it should be possible to search the description for pass, pitch, fumble etc. However what about stuff like pancakes, blocks and so on, all the off-ball stats aren't in the play description.

As for my spelling, it's been a long day,
Edited by a_esbech on Mar 25, 2014 00:15:20
 
Stobie
MoD
offline
Link
 
True if your going for a statistical approach you can actually access each pbp json which had the pathing and firing actions. Big issue with that method is it's 160-180 hits of the server per game.
 
a_esbech
offline
Link
 
Originally posted by Stobie
True if your going for a statistical approach you can actually access each pbp json which had the pathing and firing actions. Big issue with that method is it's 160-180 hits of the server per game.


You mean that there's sense to be made from the frames array? It seems to me it would be quite a heavy script to keep track of every player's movement. I made a script last night that extracted the json data from all plays in a game. However it would be a lot more useful if the data contained player stats and yards gained by the play. That way you'd be able to cross reference player stats with plays. Is your WR more useful on long or short throws. How many yds does your HB gain when running through the middle as opposed to running on the outside.

There's a lot of potential for a well structured API.
 
Page:
 


You are not logged in. Please log in if you want to post a reply.