Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
get-wow-data implements requests to the World of Warcraft (WoW) APIs so you don't have to.
Example: Get the value of all auctions from the Winterhoof server.
import getwowdata as gwd
from dotenv import load_dotenv
#get wow_api_id and wow_api_secret from .env
#or pass as kwargs into WowApi()
load_dotenv()
total_value = 0
us_api = gwd.WowApi('us', 'en_US') #region, language (optional)
winterhoof_auctions = us_api.get_auctions(4) #4 = Winterhoof's connected realm id
for item in winterhoof_auctions['auctions']:
if item.get('unit_price'):
total_value += item.get('unit_price')
elif item.get('buyout'):
total_value += item.get('buyout')
elif item.get('bid'):
total_value += item.get('bid')
print(gwd.as_gold(total_value))
#prints 430,846,968g 67s 00c
Supported APIs. (see this for a complete list of APIs provided by blizzard not all are callable by get-wow-data)
Getwowdata is avilable on PyPi:
$ python -m pip install getwowdata
To access any blizzard API you need a Client Id and Client Secret.
Remember not to commit your wow_api_secret! You can set wow_api_id and wow_api_secret as environment variables and get-wow-data will read these credentials from there.
python -m pip install dotenv
wow_api_id = x
wow_api_secret = y
import os
from dotenv import load_dotenv
load_dotenv()
os.environ['env_key': 'env_value']
See documentation site for the API.
Visit https://develop.battle.net/documentation/world-of-warcraft for blizzard official documentation. Below are notes that i've gathered from the documentation, reading the returned data, and from forum posts/reddit.
Using a normal print() on response.json() outputs gibberish. I recommend either the pprint module or viewing the json from this list of all the available APIs.
The href's in the json are links to related elements. One of the links will be to the url that produced that data.
The prices or value of an item is in the following format g*sscc, where g = gold, s = silver, c = copper. Silver and copper are fixed in the last 4 decimal spaces whlie gold can be as any number of spaces before silver. So 25289400 is 2528g 94s 00c.
Stackable items have a single unit_price while unique items like weapons have a bid/buyout price.
The item bonus list are the modifiers applied to an item, such as the level its scaled to. Blizzard does not make the bonus values and their corresponding effects available through an API.
Versions of an item with different bonuses can be found on wowhead. Mouse over select version and pick your desired version from the drop down menu.
Where the item was created. Incomplete list
Context | Value |
---|---|
1 | Normal Dungeon |
5 | Heroic Raid |
11 | Quest Reward |
14 | Vendor |
15 | Black Market |
Stub
Incomplete list
Region | Namespace | locale (language) |
---|---|---|
us | static-{region} | en_US |
eu | dynamic-{region} | es_MX |
kr | profile-{region} | pt_BR |
tw | de_DE | |
cn | en_GB | |
es_ES | ||
fr_FR | ||
it_IT | ||
ru_RU | ||
ko_KR | ||
zh_TW | ||
zh_CN |
Feel free to file an issue.
I'm currently teaching myself how to code, so, if you have any suggestions or corrections I would really appriciate it.
MIT
I was writing this for my WoW profession profit calculator site.
Hopefully you'll find this useful!
FAQs
Provides methods that make requests to specific World of Warcraft API's
We found that get-wow-data demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.