Load maps from Sc2gears Database

18 views
Skip to first unread message

CARNAR

unread,
May 13, 2012, 4:32:45 AM5/13/12
to sc2ge...@googlegroups.com
Hi, I will make a webpage that show my apm and eapm evolution.

The plan
1) Daily load replays of the current day, and proccess them (Using my API Parsing Service)
2) Filter by Me vs Human
3) Extract Apm, Eapm, etc 
4) Save the info from my own Database
5) Graph this info on a webpage

The problem
How i can download replays from my sc2gears database in this automatic process?

Can you help me?

András Belicza

unread,
May 14, 2012, 2:47:20 AM5/14/12
to sc2ge...@googlegroups.com
Hi,

The API user and the Database user are independent from each other, the API user does not have access to the replays of the Database user even if they are registered to the same Google account.

The Database does not have a public API to download files, but if you want to access/download those files, you can do it the same way the Sc2gears client does: with the Authorization key.

If you're interested, I can provide the details how to do that.

Carlos Narez

unread,
May 14, 2012, 1:38:24 PM5/14/12
to sc2ge...@googlegroups.com
Yes I'm Interested. Regards,

2012/5/14 András Belicza <icz...@gmail.com>



--

Carlos Narez Garrido


András Belicza

unread,
May 15, 2012, 7:09:36 AM5/15/12
to sc2ge...@googlegroups.com
You can get the file list with the following URL:

Remove the "DELME" from the host, I added it to avoid clicking and spam. Also substitute "YOURKEYHERE" with your authorization key.
The "beforeDate" and "afterDate" parameters are milliseconds since 1970-01-01 0:0:0 GMT+0 (this is what Date().getTime() returns in Java).
The call above returns the SHA-1 list of the files between the dates you specify, ordered by replay date descending. SHA-1's are separated with a newline character (each SHA-1 is in a different line).

You can get those replays one by one with the following calls:

Again, remove the "DELME" from the host, and replace "INSERTSHA1HERE" with the SHA-1 you want to download, and "YOURKEYHERE" with your authorization key.

Notes:
-You can use both HTTP GET and POST method.
-You can use both HTTP and HTTPS protocol (but if you use HTTP, your authorization key will be exposed to those who monitor network traffic...)

DISCLAIMER:
This method is not documented and is not part of any public API. I take no obligation keeping backward compatibility if the method changes in the future. Use at your own risk. (But most likely it won't change any soon.. or ever..)

Carlos Narez

unread,
May 15, 2012, 10:46:25 AM5/15/12
to sc2ge...@googlegroups.com
Thanks for you help András, I'll try!

2012/5/15 András Belicza <icz...@gmail.com>



--

Carlos Narez Garrido


Reply all
Reply to author
Forward
0 new messages