steamutils 1.0.47 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example.js +1 -0
- package/index.js +18 -0
- package/package.json +1 -1
package/example.js
CHANGED
package/index.js
CHANGED
@@ -4363,6 +4363,24 @@ class SteamUser {
|
|
4363
4363
|
daysSinceLastBan
|
4364
4364
|
}
|
4365
4365
|
}
|
4366
|
+
|
4367
|
+
async getAccountEmail() {
|
4368
|
+
const result = await this._httpRequest('https://store.steampowered.com/account/')
|
4369
|
+
if (!result.data) {
|
4370
|
+
return
|
4371
|
+
}
|
4372
|
+
const $ = result._$()
|
4373
|
+
let email = ''
|
4374
|
+
$('.account_setting_block').each(function () {
|
4375
|
+
if (email) return
|
4376
|
+
const account_setting_block = $(this)
|
4377
|
+
const account_data_field = account_setting_block.find('.account_manage_label + span.account_data_field')
|
4378
|
+
if (account_data_field.prev().text()?.trim() == 'Email address:') {
|
4379
|
+
email = account_data_field.text()
|
4380
|
+
}
|
4381
|
+
})
|
4382
|
+
return email
|
4383
|
+
}
|
4366
4384
|
}
|
4367
4385
|
|
4368
4386
|
export default SteamUser
|