This is the stats website we use to track the number of our devices :)
Anything MySQL compatible
Tested with:
- MariaDB 10.4.22
CREATE TABLE `DATABASENAME`.`device`(
`device_hash` TEXT NOT NULL,
`device_name` TEXT NOT NULL,
`device_version` TEXT NOT NULL,
`device_version_short` TEXT NOT NULL,
`device_country` TEXT NOT NULL,
`device_carrier` TEXT NOT NULL,
`device_carrier_id` TEXT NOT NULL,
UNIQUE `device_hash`(`device_hash`),
`timestamp` INT UNSIGNED NOT NULL
) ENGINE = INNODB;
Any php compatible webserver
Tested with:
- php 7.3.33
The API is reachable at https://stats.droid-ng.eu.org/api/v1/
https://stats.droid-ng.eu.org/api/v1/getDevice/cucmber
https://stats.droid-ng.eu.org/api/v1/COMMAND/ARGUMENT
The whole url is parsed case non-sensitive so don't worry we also accept requests like this
https://stats.droid-ng.eu.org/api/v1/GeTdEVICe/CuCUMbeR
- getAllDevices
- retuns a list of all devices sorted alphabetically
- json format:
["cucumber","cedric","sweet"]
- getTopDevices
- see config: LIMIT_TOP_GETTOPDEVICES
- returns a list of top X devices with the most installations
- json format:
["cucumber","cedric","sweet"]
- getTopCountries
- see config: LIMIT_TOP_GETTOPCOUNTRIES
- returns a list of top X countries with the most installations
- json format:
["DE","EN","US","CZ"]
- getDevice
- see config: LIMIT_GETDEVICE_TOP_COUNTRIES, LIMIT_GETDEVICE_TOP_VERSIONS
- arguments: api/v1/getDevice/DEVICE_CODENAME
- returns the following data about the device: codename, installations, top X countries
- json format:
{"name":"sweet","installations":1337,"top_countries":{"EN":200,"CZ":159,"US":44,"IT":10},"top_versions":{"17.1":359,"19.0":54}}
- registerDevice
- registers a new device or updates data from a device in our database
- Request type: POST
- expected json format:
{"device_hash": "iuhashui2879sda23414sdada", "device_name": "cucumber", "device_version": "14.1-20170101-NIGHTLY-cucumber", "device_country": "DE", "device_carrier": "SCAM MOBILE LTD", "device_carrier_id": "1337"}
- getDevice
- see config: LIMIT_GETCOUNTRY_TOP_DEVICES, LIMIT_GETCOUNTRY_TOP_VERSIONS
- arguments: api/v1/getCountry/COUNTRY_CODE (eg. DE)
- returns the following data about the country: country(-code), overall installations, top X devices, top X versions
- json format:
{"country":"DE","installations":3,"top_devices":{"cumber":2,"sweet":1},"top_versions":{"19.0":2,"19.1":1}}
- LIMIT_GETTOPDEVICES
- takes an integer
- sets the limit, how much devices will be shown in the top list of the getTopDevices command
- LIMIT_GETTOPCOUNTRIES
- takes an integer
- sets the limit, how much countries will be shown in the top list of the getTopCountries command
- CONFIG_LIMIT_GETCOUNTRY_TOP_DEVICES
- takes an integer
- sets the limit, how much countries will be shown in the top countries list of the getCountry command
- CONFIG_LIMIT_GETCOUNTRY_TOP_VERSIONS
- takes an integer
- sets the limit, how much countries will be shown in the top versions list of the getCountry command
- CONFIG_LIMIT_GETCOUNTRY_TOP_DEVICES
- takes an integer
- sets the limit, how much countries will be shown in the top countries list of the getDevice command
- CONFIG_LIMIT_GETCOUNTRY_TOP_DEVICES
- takes an integer
- sets the limit, how much countries will be shown in the top versions list of the getDevice command