Comparing version 1.3.2 to 1.3.3
@@ -26,3 +26,2 @@ 'use strict'; | ||
const accounts = response.map(function (account) { | ||
console.log(account); | ||
const accountIdentity = account.careerLink.match(options.accountIdentityRegex); | ||
@@ -109,3 +108,2 @@ | ||
accountIdentityRegex: /^\/career\/([\w]+)\/.+$/, | ||
strictPlayerSearch: true, | ||
requestOptions: { | ||
@@ -112,0 +110,0 @@ baseUrl: 'https://playoverwatch.com/en-us', |
@@ -174,3 +174,4 @@ 'use strict'; | ||
let heroName = heroes[elem.attr('data-category-id')]; | ||
let rawName = heroes[elem.attr('data-category-id')]; | ||
let heroName = rawName; | ||
@@ -188,2 +189,6 @@ if (options.normalizeNames) { | ||
if (heroStats[heroName]) { | ||
heroStats[heroName].rawName = rawName; | ||
} | ||
log('scrape', careerType, heroName, heroStats[heroName]); | ||
@@ -205,5 +210,6 @@ }); | ||
const achieved = !elem.hasClass('m-disabled'); | ||
const name = normalizeKeyName(options, elem.find('.media-card-title').text()); | ||
const rawName = elem.find('.media-card-title').text(); | ||
const name = normalizeKeyName(options, rawName); | ||
achievements.push({ name, achieved }); | ||
achievements.push({ rawName, name, achieved }); | ||
}); | ||
@@ -210,0 +216,0 @@ |
@@ -1,2 +0,2 @@ | ||
# 1.3.0 (December 29th 2017) | ||
# 1.3.2 (December 29th 2017) | ||
@@ -3,0 +3,0 @@ Fixes `.player` to work with changes to the blizzard API, specifically how it no longer |
{ | ||
"name": "oversmash", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/filp/oversmash", |
@@ -117,6 +117,12 @@ # oversmash [![npm version](https://badge.fury.io/js/oversmash.svg)](https://badge.fury.io/js/oversmash) | ||
percentsToInts: true, | ||
// Default values to use if platform & region are not passed to the playerStats | ||
// method. | ||
defaultRegion: 'us', | ||
defaultPlatform: 'pc', | ||
accountIdentityRegex: /^\/career\/([\w]+)\/([\w]+)\/.+$/, | ||
// Used to extract account details from the career link returned from the | ||
// playoverwatch API | ||
accountIdentityRegex: /^\/career\/([\w]+)\/.+$/, | ||
requestOptions: { | ||
@@ -123,0 +129,0 @@ baseURL: 'https://playoverwatch.com/en-us', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20485
315
148