{"id":20118453,"url":"https://github.com/magicoflolis/squadjs-battlemetricsapi","last_synced_at":"2026-06-04T13:31:19.552Z","repository":{"id":236842363,"uuid":"793259672","full_name":"magicoflolis/SquadJS-BattleMetricsAPI","owner":"magicoflolis","description":"Connect your SquadJS instance to BattleMetrics using the BattleMetrics API.","archived":false,"fork":false,"pushed_at":"2024-04-30T21:33:07.000Z","size":24,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-01T22:14:29.834Z","etag":null,"topics":["battlemetrics","squadjs","squadjs-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magicoflolis.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-28T21:13:53.000Z","updated_at":"2024-12-20T21:09:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"473327d2-f56b-4fcc-bd61-0cb20e521b5e","html_url":"https://github.com/magicoflolis/SquadJS-BattleMetricsAPI","commit_stats":null,"previous_names":["magicoflolis/squadjs-battlemetricsapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/magicoflolis/SquadJS-BattleMetricsAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJS-BattleMetricsAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJS-BattleMetricsAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJS-BattleMetricsAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJS-BattleMetricsAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicoflolis","download_url":"https://codeload.github.com/magicoflolis/SquadJS-BattleMetricsAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJS-BattleMetricsAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33907693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["battlemetrics","squadjs","squadjs-plugin"],"created_at":"2024-11-13T19:10:56.743Z","updated_at":"2026-06-04T13:31:19.528Z","avatar_url":"https://github.com/magicoflolis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SquadJS-BattleMetricsAPI\n\n[![GitHub License](https://img.shields.io/github/license/magicoflolis/SquadJS-BattleMetricsAPI?style=flat-square)](https://github.com/magicoflolis/SquadJS-BattleMetricsAPI/blob/main/LICENSE)\n[![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/magicoflolis/SquadJS-BattleMetricsAPI?style=flat-square)](https://github.com/magicoflolis/SquadJS-BattleMetricsAPI/issues)\n\nConnect your SquadJS instance to BattleMetrics using the [BattleMetrics API](https://www.battlemetrics.com/developers/documentation). For any issues, see [issue tracker](https://github.com/magicoflolis/SquadJS-BattleMetricsAPI/issues).\n\n**Default `config.json`:**\n\n_Be sure to add a `,` to the end of the connector before it._\n\n```json\n{\n  \"connectors\": {\n    \"BattleMetrics\": {\n      \"BanLists\": [\n        {\n          \"name\": \"Ban List Name\",\n          \"listID\": \"Ban List ID\",\n          \"UUID\": \"Ban List UUID\"\n        }\n      ],\n      \"listID\": \"Ban List ID\",\n      \"orgID\": \"Org ID\",\n      \"serverID\": \"Server ID\",\n      \"token\": \"BattleMetrics Token\",\n      \"UUID\": \"BM\"\n    }\n  }\n}\n```\n\n## Pre-requirements\n\n\u003e **Token must not be limited by organization,** why? BattleMetrics tokens can be a bit _funky_...\n\n- A BattleMetrics token.\n  - Navigate to [Developer Area](https://www.battlemetrics.com/developers)\n  - Select \"New Token\"\n  - Give it a name at the top.\n  - **Minimum:**\n    - \"Ban Lists\"\n    - \"Bans\"\n    - \"Player Notes\"\n  - **Recommended:**\n    - \"Ban Lists\"\n    - \"Bans\"\n    - \"Player Flags\"\n    - \"Player Notes\"\n    - \"RCON\"\n    - \"Triggers\"\n  - If you are having trouble, toggle everything except \"Account\" or toggle that too if needed.\n  - Why? BattleMetrics tokens can be a bit _funky_...\n\nThe connector can be used for anything BattleMetrics related, if you plan to do more than ban players or lookup players then toggle what you need.\n\n## Connector Options\n\nAnything with `?` at the end means it is **optional** and can be removed from the config.\n\n**BanLists:**\n\n\u003e **If your going to use just one ban list, set BanLists to `[]`**\n\n- `name?` - Name this ban list.\n  - If removed `name` becomes this `listID`\n- `listID` - Ban list ID\n  - Select RCON \u003e Bans \u003e Ban List \u003e View Bans \u003e Look at that URL\n  - That URL would be the listID `/rcon/bans/?filter[banList]=${ listID }`\n- `UUID?` - When a ban is created, use this string at the start of the bans UUID\n  - Useful when trying to identify SquadJS created bans.\n  - Example: If `MYORG` is the UUID then all bans will begin with it, `MYORG990CE5576D3`\n  - Defaults to global `UUID`\n  - _UUIDs become capitalized during ban creation, do not include any special characters_\n- `orgID?` - Org ID for specified ban list, **only use if token has access to that orgs ban list.**\n  - Defaults to global `orgID`\n- `serverID?` - Server ID for specified ban list, **only use if token has access to that orgs ban list.**\n  - Defaults to global `serverID`\n\n**Globals:**\n\n- `listID` - Ban list ID\n  - In BattleMetrics, select RCON \u003e Bans \u003e Ban List \u003e View Bans \u003e Look at that URL\n  - That URL would be the listID `/rcon/bans/?filter[banList]=${ listID }`\n- `orgID` - Org ID for the default ban list.\n  - Select RCON \u003e Orgs \u003e \"Select your Org\" \u003e Look at that URL\n  - Example: `/rcon/orgs/edit/${ orgID }`\n- `serverID` - Server ID for the default ban list.\n  - Example: `/servers/squad/${ serverID }`\n- `token` - Your BattleMetrics API token, see [Pre-requirements](#pre-requirements)\n- `UUID` - When a ban is created, use this string at the start of the bans UUID\n  - Useful when trying to identify SquadJS created bans.\n  - Example: If `MYORG` is the UUID then all bans will begin with it, `MYORG990CE5576D3`\n  - _UUIDs become capitalized during ban creation, do not include any special characters_\n  - **To disable, set this to `\"\"`**\n\n## Install\n\n- Copy n paste [config.json](./config.json) with your SquadJS config.\n- In your SquadJS instance, replace `/squad-server/factory.js` with the one from this repo.\n  - _If you have modified your `factory.js`, then manually add and import this connector._\n- From this repo add `/squad-server/utils/battlemetrics-api.js` and `/squad-server/utils/battlemetrics-api.d.ts` to your `/squad-server/utils` directory.\n  - `battlemetrics-api.d.ts` is used if you are going to create plugins or wanna know what each function does. Otherwise you can safely ignore adding this file.\n\n## Plugins\n\n\u003e I have also included a example plugin found in this repos `/squad-server/plugins` directory. Remove its `.txt` file extension. _Try not to enable it on a live SquadJS instance ❤️_\n\nPlugins using this connector.\n\n- [SquadJS-Watchdog](https://github.com/magicoflolis/SquadJS-Watchdog)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicoflolis%2Fsquadjs-battlemetricsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicoflolis%2Fsquadjs-battlemetricsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicoflolis%2Fsquadjs-battlemetricsapi/lists"}