{"id":15007634,"url":"https://github.com/teambrawley/bs-api","last_synced_at":"2025-10-30T11:31:50.863Z","repository":{"id":46766310,"uuid":"347652319","full_name":"teambrawley/bs-api","owner":"teambrawley","description":"An NPM Package bsapi.js","archived":false,"fork":false,"pushed_at":"2022-02-28T15:01:30.000Z","size":151,"stargazers_count":23,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-26T08:04:29.998Z","etag":null,"topics":["brawl","brawley","brawlstars","bs-api","discord","discordapp","jet-brawley","nodejs","npm","npmjs"],"latest_commit_sha":null,"homepage":"https://npmjs.com/bsapi.js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teambrawley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-14T14:00:56.000Z","updated_at":"2023-09-03T15:21:35.000Z","dependencies_parsed_at":"2022-08-22T19:10:28.814Z","dependency_job_id":null,"html_url":"https://github.com/teambrawley/bs-api","commit_stats":null,"previous_names":["brawlie/bs-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambrawley%2Fbs-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambrawley%2Fbs-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambrawley%2Fbs-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambrawley%2Fbs-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teambrawley","download_url":"https://codeload.github.com/teambrawley/bs-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238960585,"owners_count":19559303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brawl","brawley","brawlstars","bs-api","discord","discordapp","jet-brawley","nodejs","npm","npmjs"],"created_at":"2024-09-24T19:12:51.184Z","updated_at":"2025-10-30T11:31:45.508Z","avatar_url":"https://github.com/teambrawley.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## BS-API \n\nAn npm package that can interact with [bs-api](https://cr.is-a.dev) easily.\n\n\n### Install \n```\nnpm install bsapi.js\n```\n\n### Updates\n Version v2.0.6\n\u003e \n- Bug Fixes \n- Fixed Tag Validator `Regexp`\n\n### Types \n\n| Request Types | Description |\n| --------------|----------------|\n| `get` | Uses Get Method To Request Data |\n| `post` | Uses Post Method To Request Data |\n| `ws` | Uses WebSocket To Receive Data |\n\n______________________________________\n\n| Response Type | Description |\n| ----------- | --------------- |\n| `player` | Get A Player's Game Stats |\n| `clubs` | Get A Club's Stats |\n| `rankings/players` | Top Rankings ( Player ) |\n| `rankings/clubs` | Top Rankings ( Club ) |\n| `brawlers` | List Of Every Brawlers |\n| `events` | Events Rotation |\n|  You can find the list of every response types at [here](https://github.com/brawlie/BrawlStars-Stats) |\n\n\n\n\n### Usage \n\n```js\nconst bs = require('bsapi.js')\n\nbs.\u003cRequest_Type\u003e('\u003cType\u003e','\u003cTAG\u003e').then(res =\u003e {\n\n  // Handle Datas\n\n}).catch(err =\u003e // Handle Errors )\n\n```\n\n- #### Example Usage\n  \n  `Get` A Player's In-Game Profile Information\n  \n   ```js\n   bs.get('player','82PGQVJ2L').then(res =\u003e {\n   console.log(res)\n   }).catch(err =\u003e console.log(err))\n  ```\n  \n  `Get` Current Event Rotation ( Async / Await )\n \n   ```js\n   (async () =\u003e {\n   console.log(await bs.get('events'));\n   })();\n   ```\n  `WebSocket` To Get Battlelogs\n \n   ```js\n   bs.ws({\n   type: 'battlelog',\n   tag: '82PGQVJ2L'\n   }, (err, data) =\u003e {\n    console.log(err, data)\n   })\n   ```\n   \n### Tag Validator \nThis function allows you to validate a Brawl Stars Tag\n```js\nconst { validator } = require('bsapi.js')\n// ... ( async )\nawait validator('\u003cType\u003e', '\u003c#TAG\u003e')\n```\n*supported types : `club`, `player`, `brawlers`*\n\nOr Use Regexp ( Only Validates Tag Pattern, Doesn't Tell If Its Exist )\n```js\nconst { regexp } = require('bsapi.js');\n// Returns Boolean ( true / false )\nregexp('\u003c#TAG\u003e')\n```\n*supported types : `club`, `player`, `map`*\n\n### CLI\nInteract with bs-api through cli.\n```\nnpm install -g bsapi.js\n```\n*to use cli, you'll have to install this package globally*\n\n- ### Usage\n  ---\n  **To learn more about CLI options/commands, run the help command or `-h` (or `--help`) argument :**\n  \n  ```\n  $ bs help\n  ```\n\n### License \n```Apache-2.0```\n\n- ### Links\n\n  - [Docs](https://bsapi.is-a.dev)\n  - [Repository](https://github.com/brawlie/bs-api)\n  \n- ### Contributors\n\n  - [@joeleeofficial](https://github.com/joeleeofficial)\n  - [@teambrawley](https://github.com/brawlie)\n  - [@w3cy](https://github.com/w3cy)\n\n- ### Disclaimer\n  - See [Supercell's Fan Content Policy](https://supercell.com/en/fan-content-policy/)\n\n\n\u003c!--\n * bsapi.js\n * (c) 2021 Joe Lee\n * Released under the Apache-2.0 License.\n --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteambrawley%2Fbs-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteambrawley%2Fbs-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteambrawley%2Fbs-api/lists"}