{"id":13623237,"url":"https://github.com/filp/oversmash","last_synced_at":"2025-04-30T07:27:55.822Z","repository":{"id":20183377,"uuid":"84883954","full_name":"filp/oversmash","owner":"filp","description":"Overwatch API library for player details and career stats","archived":false,"fork":false,"pushed_at":"2023-01-09T19:32:24.000Z","size":473,"stargazers_count":44,"open_issues_count":2,"forks_count":7,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-14T21:46:37.363Z","etag":null,"topics":["api","gaming","nodejs","overwatch","scraping"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/filp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-13T23:22:59.000Z","updated_at":"2024-01-23T20:42:57.000Z","dependencies_parsed_at":"2023-01-14T00:30:23.176Z","dependency_job_id":null,"html_url":"https://github.com/filp/oversmash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filp%2Foversmash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filp%2Foversmash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filp%2Foversmash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filp%2Foversmash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filp","download_url":"https://codeload.github.com/filp/oversmash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246326595,"owners_count":20759436,"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":["api","gaming","nodejs","overwatch","scraping"],"created_at":"2024-08-01T21:01:29.421Z","updated_at":"2025-03-31T13:31:09.480Z","avatar_url":"https://github.com/filp.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Community"],"sub_categories":["Github"],"readme":"# oversmash [![npm version](https://badge.fury.io/js/oversmash.svg)](https://badge.fury.io/js/oversmash)\n\n# Important note:\n\nAs of October 2022, Blizzard has disabled the pages and APIs used by Oversmash to capture player data, due to the release of Overwatch 2 (replacing Overwatch 1). This library will be updated with a `2.x` release accordingly once Blizzard releases new information on new player profiles and APIs.\n\n---\n\nAPI wrapper for Blizzard's Overwatch player stats. Uses promises.\n\nBlizzard does not expose an official API, so this library relies partially on scraping, using [cheerio](https://github.com/cheeriojs/cheerio).\n\nPlease also keep in mind there is no builtin rate-limiting support, so it's on you to use the library responsibly.\n\n**Note: See [CHANGELOG.MD](/CHANGELOG.md) for change details**\n\n## Features\n\n- Ability to retrieve basic user information, such as name, portrait, level and accounts\n  - Correctly identifies the platform for each account\n- Ability to retrieve detailed stats for a player, for a given region and platform\n  - Includes **all** stats available on playoverwatch.com\n  - Includes the player's current competitive rank\n  - Includes full list of achievements, with details on which the player has completed\n  - Stats are retrieved and grouped automatically per career type (quickplay/competitive), hero, and group (e.g combat, awards, etc)\n  - Supports new heroes and new types of stats as they're added, no changes required to the code\n- Supports normalizing names and values (e.g converting achievement names to `snake_case`, properly handling floating-point values in stats, etc)\n- Minimalist and straightforward API\n\n## Usage\n\nInstall through `npm` or `yarn`:\n\n```shell\n$ yarn add oversmash\n# or\n$ npm i -S oversmash\n```\n\n### Example:\n\n```js\nimport oversmash from 'oversmash';\n\n// Create a new oversmash object. `oversmash()` accepts an options\n// object (see below)\nconst ow = oversmash();\n\n// Get basic details about a user, including their platform accounts.\n//\now.player('bob#12345').then((player) =\u003e {\n  console.log(player);\n});\n\n// Output:\n// { name: 'bob#12345',\n//   accounts:\n//    [ { level: 440,\n//        portrait: 'https://blzgdapipro-a.akamaihd.net/game/unlocks/xyz.png',\n//        displayName: 'bob#12345',\n//        platform: 'pc' } ] }\n\n// Get detailed stats about a user, including\n// achievements unlocked, per-career and per-hero stats, and their\n// current competitive rank\now.playerStats('bob#12345', 'pc').then((player) =\u003e {\n  console.log(player);\n});\n\n// Output:\n// { name: 'bob#12345',\n//   region: 'us',\n//   platform: 'pc',\n//   stats:\n//    { competitiveRank: { support: 1234, tank: 1234, damage: 1234 },\n//      endorsementLevel: 3,\n//      gamesWon: 2500,\n//      achievements:\n//       [ { name: 'centenary', achieved: true },\n//         { name: 'level_10', achieved: true },\n//         { name: 'level_25', achieved: true },\n//         { name: 'level_50', achieved: true },\n//         { name: 'undying', achieved: true },\n//         { name: 'survival_expert', achieved: true },\n//         /* ... etc ... */],\n//      quickplay:\n//       { all: { /* avg stats across all characters */ }\n//         reaper:\n//          { combat:\n//             { melee_final_blows: 190,\n//               solo_kills: 2922,\n//               objective_kills: 6592,\n//               final_blows: 9519,\n//               damage_done: 6897,\n//               eliminations: 18456,\n//               environmental_kills: 83,\n//               multikills: 155 },\n//            assists:\n//             { healing_done: 1102,\n//               recon_assists: 25,\n//               teleporter_pads_destroyed: 18 },\n//            best:\n//             { eliminations_most_in_game: 44,\n//               final_blows_most_in_game: 27,\n//               damage_done_most_in_game: 17491,\n//   /* ... etc ... */\n```\n\n### `oversmash()` options\n\nThe following options are configurable.\n\n```js\n{\n  // Convert things like stat group names to snake_case (e.g ana.awards.medalsBronze vs ana.awards.medals_bronze)\n  normalizeNames: true,\n\n  // When set to snake, names are normalized as snake_case; when set to camel,\n  // names are lowerCamelCase. Only applies if normalizeNames is enabled.\n  normalizeNamesAs: 'snake' || 'camel',\n\n  // Convert values to their correct format, e.g numbers in stats to JS numbers\n  // When disabled, all stats values are strings as extracted from Blizzard\n  normalizeValues: true,\n\n  // Convert percentage values to ints, e.g '32%' to 32\n  percentsToInts: true,\n\n  // The url template used to build the full portrait url, where the player's Overwatch\n  // career icon/profile image is available.\n  //\n  // %s is replaced with the value from the player's profile.\n  portraitUrlTemplate: 'https://d1u1mce87gyfbn.cloudfront.net/game/unlocks/%s.png',\n\n  // Default platform if none is specified in the options\n  defaultPlatform: 'pc',\n\n  baseURL: 'https://playoverwatch.com/en-us',\n  headers: {\n    'User-Agent': 'https://github.com/filp/oversmash (hi jeff)'\n  }\n}\n```\n\n## Debugging\n\n`oversmash` uses [debug](https://github.com/visionmedia/debug). Run your code calling oversmash with\n`DEBUG=oversmash:*` to enable debug logging\n\n## Stuff 🐝 🐝 🐝\n\nSee [`LICENSE.md`](/LICENSE.md) for license information\n\nContributions are welcome - please follow the style guidelines as enforced by the included `.eslintrc`!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilp%2Foversmash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilp%2Foversmash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilp%2Foversmash/lists"}