mirror of
https://github.com/FliegendeWurst/googleplay-api.git
synced 2024-11-24 13:54:57 +00:00
Added script to fetch devices from play-store-api
This commit is contained in:
parent
99ae4cba0e
commit
13bc63b927
@ -1,8 +1,13 @@
|
|||||||
# Documentation
|
# Documentation
|
||||||
|
|
||||||
This is a collection of API requests and response for most of the paths that google play API offers. In general, each requests usually return the following protobuf objects:
|
This is a collection of API requests and response for most of the
|
||||||
|
paths that google play API offers. In general, each requests
|
||||||
|
usually return the following protobuf objects:
|
||||||
|
|
||||||
- *payload*: contains the response object (see `googleplay.proto` for all types of responses).
|
- *payload*: contains the response object
|
||||||
- (optional) *preFetch*: if the payload contains an URL to be fetched in order to get results, these results may be pre-fetched by google serversand included in the original response.
|
(see `googleplay.proto` for all types of responses).
|
||||||
|
- (optional) *preFetch*: if the payload contains an URL to be fetched
|
||||||
|
in order to get results, these results may be pre-fetched by google
|
||||||
|
servers and included in the original response.
|
||||||
|
|
||||||
Each requests is discussed in the related subfolder.
|
Each requests is discussed in the related subfolder.
|
||||||
|
1480
gpapi/device.properties
Normal file
1480
gpapi/device.properties
Normal file
File diff suppressed because it is too large
Load Diff
33
scripts/fetch_devices.sh
Executable file
33
scripts/fetch_devices.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
REPO_SRC="https://github.com/yeriomin/play-store-api"
|
||||||
|
REPO_LOCAL="/tmp/psapi"
|
||||||
|
RES_DIR="${REPO_LOCAL}/src/main/resources"
|
||||||
|
|
||||||
|
DEVS_FILE="./gpapi/device.properties"
|
||||||
|
|
||||||
|
command -v git >/dev/null 2>&1 || { echo "git not installed"; exit 1; }
|
||||||
|
|
||||||
|
if [ ! -d "./gpapi" ]; then
|
||||||
|
echo "No gpapi dir found! Make sure you're in googleplay-api root dir"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "==> Cloning play-store-api repo into $REPO_LOCAL"
|
||||||
|
git clone $REPO_SRC $REPO_LOCAL &>/dev/null
|
||||||
|
|
||||||
|
# clean device.properties file
|
||||||
|
echo "" > $DEVS_FILE
|
||||||
|
|
||||||
|
for dev in `ls $RES_DIR`; do
|
||||||
|
FILE="$RES_DIR/$dev"
|
||||||
|
NAME=`echo $dev | sed -e "s/device-\(.*\).properties/\1/"`
|
||||||
|
echo "==> appending device data for $NAME"
|
||||||
|
echo "[$NAME]" >> $DEVS_FILE
|
||||||
|
cat $FILE >> $DEVS_FILE
|
||||||
|
echo "" >> $DEVS_FILE
|
||||||
|
done
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
echo "==> Cleanup"
|
||||||
|
rm -rf $REPO_LOCAL
|
Loading…
Reference in New Issue
Block a user