# WoW Commodities
[![PyPI - Version](https://img.shields.io/pypi/v/wow-commodities.svg)](https://pypi.org/project/wow-commodities)
-----
**WoW Commodities** is a tool to download [World of Warcraft](https://worldofwarcraft.blizzard.com/) commodities auction data using [Blizzard API](https://develop.battle.net/documentation).
## Installation
```console
pip install WoW_Commodities
```
## Usage
**WoW Commodities** needs tree positional arguments (in that order):
- id: a client ID from the Blizzard API.
- secret: a secret from the Blizzard API.
- path: a writable path including the filename.
Details on how to create those credentials can be found [here](https://develop.battle.net/documentation/guides/getting-started).
**WoW Commodities** may also take optional arguments defining the region of the downloaded data. The supported regions are:
- us = North America
- eu = Europe
- kr = Korea
- tw = Taiwan
- cn = China
Defaults to `us`.
And a localization paramenter for language translations. The supported localization are:
- US Region: en_US, es_MX, pt_BR
- EU Region: en_GB, es_ES, fr_FR, ru_RU, de_DE, pt_PT, it_IT
- KR Region: ko_KR
- TW Region: zh_TW.
- CN Region: zh_CN
Bear in mind that not all combinations of Regions and Localizations are valid. For more details on those combinations read [this article](https://develop.battle.net/documentation/guides/regionality-and-apis).
Defaults to `en_US`.
With optional arguments:
```console
wow-commodities -r us -l en_US id secret C:\User\username\Downloads\data.csv.xz
```
Without optional arguments:
```console
wow-commodities id secret C:\User\username\Downloads\data.csv.xz
```
Where `id` and `secret` are your ID and SECRET from Blizzard API (alphanumerical sequences), and
`username` is your computer user. You may change this path completely if you wish, just be sure the path exists and is writable.
The downloaded data will be in a [LZMA](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm) (xz extention) compressed [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) file. Once this data file can get pretty big some times.
If needed you may uncompress it with [7-Zip](https://www.7-zip.org/download.html) and use the tools of preference to analyse it, but keep in mind that several tools can read it compressed (like [R](https://cran.r-project.org/)), without the need to unpack the file. Spreadsheet software might need the uncompressed file.
P.S.: Since chinese API uses a completely diferent set of links and the server seems to have access limitations, I was unable to test it. So I can't confirm if it works with for the Chinese region.
## The Data
The downloaded data consists of four columns:
- ID: a numeric identification of the auction.
- Item: a numeric identification of the item.
- Quantity: the amount of an item in the auction.
- Unit Price: the value in copper per item unit (divide by 10000 to see the value in gold). The total value of the auction can be calculated multiplying this by quantity.
- Time Left: time remaing for the auction to expire. This consists of categorical values (SHORT, MEDIUM, LONG and VERY LONG).
You can use a website like [Wowhead](https://www.wowhead.com/) to discover the item id you want to focus on. This is prefered since items can have repeated names and lots of translations, but only an unique ID. e.g: in https://www.wowhead.com/item=197794/grand-banquet-of-the-kaluak, *item=197794* is the item id you want for *Grand Banquet of Kalu'ak*.
IMPORTANT:
> Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.
So, it's pointless to download data in intervals lower than the API updates.
## R import Example
Below an example of a R Script to import the data. Now you can have fun with it.
```R
library(readr)
item_id = 197794 # Grand Banquet of the Kalu'ak
commodities <- read_csv(
'C:\my\path\to\data.csv.xz',
col_types = cols_only(
`ID` = col_character(),
`Item` = col_factor(),
`Quantity` = col_integer(),
`Unit Price` = col_double(),
`Time Left` = col_factor(
levels = c('SHORT', 'MEDIUM', 'LONG', 'VERY_LONG'),
ordered = T,
),
)
)
commodities$`Unit Price` <- commodities$`Unit Price` / 10000 # gold
```
You can even produce prety cool graphics with such data.
![Graphic produced using R and ggplot.](https://i.imgur.com/LKAmPvb.jpg)
## License
**Wow Commodities** is distributed under the terms of the [LGPL 3.0](https://www.gnu.org/licenses/lgpl-3.0-standalone.html) license.
This application comes with no warrant of any kind. Use at your own risk.
Raw data
{
"_id": null,
"home_page": null,
"name": "WoW_Commodities",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "Auction House,Commodities,World of Warcraft",
"author": null,
"author_email": "\"Aluizio, R.\" <gambit01@bol.com.br>",
"download_url": "https://files.pythonhosted.org/packages/41/1d/f0f227f1465673790602d88c6aa4d0955349ba2419fc1d533cbf3e7946b2/wow_commodities-1.0.3.tar.gz",
"platform": null,
"description": "# WoW Commodities\n\n[![PyPI - Version](https://img.shields.io/pypi/v/wow-commodities.svg)](https://pypi.org/project/wow-commodities)\n\n-----\n\n**WoW Commodities** is a tool to download [World of Warcraft](https://worldofwarcraft.blizzard.com/) commodities auction data using [Blizzard API](https://develop.battle.net/documentation).\n\n## Installation\n\n```console\npip install WoW_Commodities\n```\n\n## Usage\n\n**WoW Commodities** needs tree positional arguments (in that order): \n- id: a client ID from the Blizzard API.\n- secret: a secret from the Blizzard API.\n- path: a writable path including the filename.\n\nDetails on how to create those credentials can be found [here](https://develop.battle.net/documentation/guides/getting-started).\n\n**WoW Commodities** may also take optional arguments defining the region of the downloaded data. The supported regions are:\n\n- us = North America\n- eu = Europe\n- kr = Korea\n- tw = Taiwan\n- cn = China\n\nDefaults to `us`.\n\nAnd a localization paramenter for language translations. The supported localization are:\n- US Region: en_US, es_MX, pt_BR\n- EU Region: en_GB, es_ES, fr_FR, ru_RU, de_DE, pt_PT, it_IT\n- KR Region: ko_KR\n- TW Region: zh_TW.\n- CN Region: zh_CN\n\nBear in mind that not all combinations of Regions and Localizations are valid. For more details on those combinations read [this article](https://develop.battle.net/documentation/guides/regionality-and-apis).\n\nDefaults to `en_US`.\n\nWith optional arguments:\n```console\nwow-commodities -r us -l en_US id secret C:\\User\\username\\Downloads\\data.csv.xz\n```\n\nWithout optional arguments:\n```console\nwow-commodities id secret C:\\User\\username\\Downloads\\data.csv.xz\n```\n\nWhere `id` and `secret` are your ID and SECRET from Blizzard API (alphanumerical sequences), and\n`username` is your computer user. You may change this path completely if you wish, just be sure the path exists and is writable.\n\nThe downloaded data will be in a [LZMA](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm) (xz extention) compressed [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) file. Once this data file can get pretty big some times.\n\nIf needed you may uncompress it with [7-Zip](https://www.7-zip.org/download.html) and use the tools of preference to analyse it, but keep in mind that several tools can read it compressed (like [R](https://cran.r-project.org/)), without the need to unpack the file. Spreadsheet software might need the uncompressed file.\n\nP.S.: Since chinese API uses a completely diferent set of links and the server seems to have access limitations, I was unable to test it. So I can't confirm if it works with for the Chinese region.\n\n## The Data\n\nThe downloaded data consists of four columns:\n\n- ID: a numeric identification of the auction.\n- Item: a numeric identification of the item.\n- Quantity: the amount of an item in the auction.\n- Unit Price: the value in copper per item unit (divide by 10000 to see the value in gold). The total value of the auction can be calculated multiplying this by quantity.\n- Time Left: time remaing for the auction to expire. This consists of categorical values (SHORT, MEDIUM, LONG and VERY LONG).\n\nYou can use a website like [Wowhead](https://www.wowhead.com/) to discover the item id you want to focus on. This is prefered since items can have repeated names and lots of translations, but only an unique ID. e.g: in https://www.wowhead.com/item=197794/grand-banquet-of-the-kaluak, *item=197794* is the item id you want for *Grand Banquet of Kalu'ak*.\n\nIMPORTANT:\n\n> Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.\n\nSo, it's pointless to download data in intervals lower than the API updates.\n\n## R import Example\n\nBelow an example of a R Script to import the data. Now you can have fun with it.\n\n```R\nlibrary(readr)\n\nitem_id = 197794 # Grand Banquet of the Kalu'ak\n\ncommodities <- read_csv(\n 'C:\\my\\path\\to\\data.csv.xz',\n col_types = cols_only(\n `ID` = col_character(),\n `Item` = col_factor(),\n `Quantity` = col_integer(),\n `Unit Price` = col_double(),\n `Time Left` = col_factor(\n levels = c('SHORT', 'MEDIUM', 'LONG', 'VERY_LONG'),\n ordered = T,\n ),\n )\n)\n\ncommodities$`Unit Price` <- commodities$`Unit Price` / 10000 # gold\n```\n\nYou can even produce prety cool graphics with such data.\n\n![Graphic produced using R and ggplot.](https://i.imgur.com/LKAmPvb.jpg)\n\n## License\n\n**Wow Commodities** is distributed under the terms of the [LGPL 3.0](https://www.gnu.org/licenses/lgpl-3.0-standalone.html) license.\n\nThis application comes with no warrant of any kind. Use at your own risk.",
"bugtrack_url": null,
"license": null,
"summary": "Download World of Warcraft commodities auction data for the specified region.",
"version": "1.0.3",
"project_urls": {
"Documentation": "https://github.com/Godrigos/WoW_Commodities#readme",
"Issues": "https://github.com/Godrigos/WoW_Commodities/issues",
"Source": "https://github.com/Godrigos/WoW_Commodities"
},
"split_keywords": [
"auction house",
"commodities",
"world of warcraft"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "31346daf043fb9f4300286a11dd663c5e1e7c081504cd8517bdde6264d5b0ee1",
"md5": "b300a32dba320ff5fed239be969d9b7f",
"sha256": "1848c162bff99f1ab7b8c82f37c450b206b1bb909c2060d3c92e272655af2422"
},
"downloads": -1,
"filename": "wow_commodities-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b300a32dba320ff5fed239be969d9b7f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 9235,
"upload_time": "2023-06-19T12:58:41",
"upload_time_iso_8601": "2023-06-19T12:58:41.757037Z",
"url": "https://files.pythonhosted.org/packages/31/34/6daf043fb9f4300286a11dd663c5e1e7c081504cd8517bdde6264d5b0ee1/wow_commodities-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "411df0f227f1465673790602d88c6aa4d0955349ba2419fc1d533cbf3e7946b2",
"md5": "4e7c383e340a6352af45e0bff31dee51",
"sha256": "6971955bf6b3caa1909664f08cef81e0e7ae115e4b17487387e567c9f698b8bb"
},
"downloads": -1,
"filename": "wow_commodities-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "4e7c383e340a6352af45e0bff31dee51",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 8670,
"upload_time": "2023-06-19T12:58:43",
"upload_time_iso_8601": "2023-06-19T12:58:43.461788Z",
"url": "https://files.pythonhosted.org/packages/41/1d/f0f227f1465673790602d88c6aa4d0955349ba2419fc1d533cbf3e7946b2/wow_commodities-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-19 12:58:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Godrigos",
"github_project": "WoW_Commodities#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "wow_commodities"
}