stable #1
5 changed files with 100 additions and 8 deletions
31
README.md
31
README.md
|
|
@ -1,3 +1,32 @@
|
||||||
# KPlaySearch
|
# KPlaySearch
|
||||||
|
KPlaySearch (KaKi's Google Play search engine) allows you to perform advanced G-Play search, using filters and sorting features. [Demo](https://playsearch.kaki87.net/)
|
||||||
|
|
||||||
KPlaySearch (KaKi's Google Play search engine) allows you to perform advanced G-Play search, using filters and sorting features.
|
## Getting Started
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
- NodeJS
|
||||||
|
- Yarn
|
||||||
|
|
||||||
|
### Installing
|
||||||
|
```
|
||||||
|
yarn install
|
||||||
|
yarn start
|
||||||
|
```
|
||||||
|
|
||||||
|
## Built With
|
||||||
|
Node modules :
|
||||||
|
- [google-play-scraper](https://github.com/facundoolano/google-play-scraper) - GPlay API
|
||||||
|
- [Socket.IO](https://socket.io/) - Real time client/server
|
||||||
|
|
||||||
|
Web components :
|
||||||
|
- [FontAwesome](https://fontawesome.com/) - Icon pack
|
||||||
|
- [UIKit](https://getuikit.com/) - Front end framework
|
||||||
|
- [JavaScript Cookie](https://github.com/js-cookie/js-cookie) - JS cookie API
|
||||||
|
|
||||||
|
## Authors
|
||||||
|
**KaKi87 (Tiana Lemesle)** - *Initial work*
|
||||||
|
|
||||||
|
Special thanks to ribt, DotDotDot, TheDevKiller, Fomys and Guysmow from the *french* [CQSCMQPI](https://discord.gg/79JjWTF) Discord server.
|
||||||
|
|
||||||
|
## License
|
||||||
|
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
|
||||||
26
gplay.js
Normal file
26
gplay.js
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
import GPlay from 'google-play-scraper';
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
search: (query, callback) => {
|
||||||
|
GPlay.search({
|
||||||
|
term: query.name,
|
||||||
|
num: query.number,
|
||||||
|
price: query.price,
|
||||||
|
fullDetail: true
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
let i = 0;
|
||||||
|
res.forEach(app => {
|
||||||
|
GPlay.permissions({ appId: app.appId })
|
||||||
|
.then(permissionsList => {
|
||||||
|
app.permissions = permissionsList;
|
||||||
|
i++;
|
||||||
|
if(i === res.length)
|
||||||
|
callback(res);
|
||||||
|
})
|
||||||
|
.catch(err => console.log(err));
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(err => console.log(err));
|
||||||
|
}
|
||||||
|
};
|
||||||
16
index.js
Normal file
16
index.js
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import Play from './gplay.js';
|
||||||
|
import express from 'express';
|
||||||
|
import http from 'http';
|
||||||
|
import socketio from 'socket.io';
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
app.use(express.static('public'));
|
||||||
|
|
||||||
|
const server = http.createServer(app);
|
||||||
|
server.listen(3593);
|
||||||
|
|
||||||
|
const io = socketio.listen(server);
|
||||||
|
|
||||||
|
io.on('connection', socket => {
|
||||||
|
socket.on('search', query => Play.search(query, res => socket.emit('res', res)));
|
||||||
|
});
|
||||||
21
package.json
Normal file
21
package.json
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "kplaysearch",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Free, in-app free and ad free G-Play search",
|
||||||
|
"main": "index.js",
|
||||||
|
"author": "KaKi87",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.16.3",
|
||||||
|
"google-play-scraper": "^6.2.0",
|
||||||
|
"http": "^0.0.0",
|
||||||
|
"socket.io": "^2.1.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"babel-preset-env": "^1.7.0",
|
||||||
|
"babel-register": "^6.26.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "node start.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in a new issue