grannysmith-technical/content/StatsServer.md

36 lines
1.2 KiB
Markdown
Raw Normal View History

---
title: "Stats Server"
#description: ""
# layout: "definition"
page_status:
- 'stub'
---
## Details
### Sending
The game sends a HTTP POST request for:
```plain
/stats/stats.php?product=full&platform=android&version=1.3.8
```
- `product`: most likely used to indicate if the game is a `full` version or the
`free` one
- `platform`: platform that the game is on, for example android
- `version`: game version
with a xml document (gzip compressed) containing user's statistics, for example:
```xml
<granny uid="2137069420" coins="115" level="7" adsrevision="1" adsfront="1" adsplus="0" adsshown="1" timesstarted="9" version="1.3.8" platform="android" model="POCO F1" laststats="0">
<level name="warming_up" score="11234" scorehard="0" apples="3" appleshard="0" playcount="1" clearcount="1" diecount="0" diepos="0 0" restartcount="0" restartpos="0 0" />
<level name="2" score="8442" scorehard="0" apples="3" appleshard="0" playcount="2" clearcount="1" diecount="0" diepos="0 0" restartcount="1" restartpos="219 -33" />
</granny>
```
if user just started playing, the document might look like this:
```xml
<granny uid="2137069420" timesstarted="1" version="1.3.8" platform="android" model="POCO F1" laststats="0" />
```