forked from facundoolano/google-play-api
-
Notifications
You must be signed in to change notification settings - Fork 0
GPlay API 2026.01 #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
srikanthlogic
wants to merge
2
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Bruno Run | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: [ "main" ] | ||
| paths: [ '!bruno/**' , '!.github/**' ] | ||
| pull_request: | ||
| branches: [ "main", "dev" ] | ||
|
|
||
| jobs: | ||
| bruno: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
|
|
||
| - name: Check out repository code and Install | ||
| uses: actions/checkout@v4 | ||
| - run: npm install | ||
| - run: npm run generateoas | ||
| - run: npm start & npx wait-on http://localhost:3000 | ||
| - run: npm test | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| npx lint-staged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # AGENTS.md - Agentic Coding Guide for Google Play API | ||
|
|
||
| ## Project Overview | ||
| REST API wrapper around google-play-scraper for fetching Google Play Store data. Express.js application using ES modules. | ||
|
|
||
| ## Build/Lint/Test Commands | ||
|
|
||
| ```bash | ||
| # Install dependencies | ||
| npm install | ||
|
|
||
| # Start development server (port 3000) | ||
| npm start | ||
|
|
||
| # Run all tests (Newman Postman collections) | ||
| npm test | ||
|
|
||
| # Generate OpenAPI spec from Postman collections | ||
| npm run generateoas | ||
|
|
||
| # Lint code (semistandard style) | ||
| npx eslint . | ||
|
|
||
| # Auto-fix linting issues | ||
| npx eslint . --fix | ||
| ``` | ||
|
|
||
| **Note**: No single test runner available. Tests use Newman with Postman collections in `PostmanCollections/`. | ||
|
|
||
| ## Code Style Guidelines | ||
|
|
||
| ### ESLint Configuration | ||
| - **Extends**: `semistandard` (semicolons required) | ||
| - **Environment**: ES6, Node.js, Mocha | ||
| - **Key Rule**: `no-unused-vars` flags all unused variables | ||
|
|
||
| ### Formatting | ||
| - Use semicolons at end of statements | ||
| - 2-space indentation | ||
| - Single quotes for strings | ||
| - No trailing spaces | ||
|
|
||
| ### Naming Conventions | ||
| - Variables/functions: `camelCase` | ||
| - Constants: `UPPER_CASE` for true constants | ||
| - Files: `kebab-case.js` (e.g., `index.js`) | ||
|
|
||
| ### Imports/Modules | ||
| - ES modules only (`"type": "module"` in package.json) | ||
| - Use single quotes: `import Express from 'express'` | ||
| - Group imports: core modules → external → internal | ||
|
|
||
| ### Error Handling | ||
| - Use Express error middleware: `(err, req, res, next) => {...}` | ||
| - Pass errors with `next(err)` | ||
| - 404 for "App not found", 400 for other bad requests | ||
| - Include error message in JSON response | ||
|
|
||
| ### Code Patterns | ||
| - Use `'use strict'` at top of files | ||
| - Prefer `const` and `let` over `var` | ||
| - Use arrow functions: `(req, res, next) => {...}` | ||
| - Promise chains: `.then().catch(next)` pattern | ||
| - Destructuring: `const { param1, param2 } = req.query` | ||
|
|
||
| ### Route Patterns | ||
| ```javascript | ||
| router.get('/endpoint', function (req, res, next) { | ||
| const opts = Object.assign({ default: 'value' }, req.query); | ||
| gplay.method(opts) | ||
| .then(transformData) | ||
| .then(toList) | ||
| .then(res.json.bind(res)) | ||
| .catch(next); | ||
| }); | ||
| ``` | ||
|
|
||
| ## Environment Configuration | ||
| Copy `.env.sample` to `.env`: | ||
| - `PORT`: Server port (default: 3000) | ||
| - `COUNTRY_OF_QUERY`: Default country for queries (default: IN) | ||
| - `LOGGING`: Enable HTTP logging (default: true) | ||
| - `RATE_LIMIT_*`: Rate limiting configuration | ||
|
|
||
| ## Project Structure | ||
| ``` | ||
| ├── server.js # Express app entry point | ||
| ├── lib/ | ||
| │ └── index.js # API route handlers | ||
| ├── test.js # Newman test runner | ||
| ├── PostmanCollections/# Test collections | ||
| ├── openapi/ # Swagger/OpenAPI specs | ||
| ├── .eslintrc # Linting config | ||
| └── Dockerfile # Container config | ||
| ``` | ||
|
|
||
| ## Key Dependencies | ||
| - `express`: Web framework | ||
| - `google-play-scraper`: Core scraping library | ||
| - `cors`: CORS middleware | ||
| - `express-rate-limit`: Rate limiting | ||
| - `newman`: Postman test runner | ||
|
|
||
| ## API Conventions | ||
| - Base path: `/api/` | ||
| - JSON responses only | ||
| - Use `toList()` wrapper: `{ results: [...] }` | ||
| - `cleanUrls()` helper for consistent URL generation | ||
| - Support `country` query param for localization |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 23 days ago
In general, this issue is fixed by adding an explicit
permissionsblock that scopes theGITHUB_TOKENto the least privileges required. This can be done either at the workflow root (applies to all jobs) or within the specific job. Since this workflow has a single job and appears to only need read access to clone the repository,contents: readis sufficient as a minimal starting point.The best fix without changing existing functionality is to add a
permissionssection at the workflow root, directly under thename:(oron:) key. This will apply to all jobs (currently onlybruno) and ensure theGITHUB_TOKENis restricted to repository contents read access, which is enough foractions/checkoutand typical Node-based CI steps. No additional imports, methods, or definitions are required—this is purely a YAML configuration change in.github/workflows/bruno.yml, around lines 1–4, adding: