Conversation
|
Hi @Naramsim! Could you share your thoughts on the new |
0d594ce to
4423e08
Compare
|
Hi! Thanks for the implementation. Would it be fine to remove the By looking at the value of |
| ), | ||
| ), | ||
| ("name", models.CharField(max_length=100)), | ||
| ("cost", models.IntegerField(null=True, blank=True)), |
There was a problem hiding this comment.
We shouldn't touch old migration files.
There was a problem hiding this comment.
Should we remove the cost field in a new migration since it's no longer used?
I think it's fine to remove I'm also wondering how we should handle items that can be obtained via other “currencies” instead of Poké Dollars, like candies or similar resources (for example, TM001). Do you have any ideas on how we could represent that in the pricing model? I'm also unsure. We would first need a list of all available methods and then discuss the best solution. |
|
Add script to scrape Poké Ball prices from Bulbapedia. If this works well, I'll handle other item categories in separate PRs |
|
Hi! I posted a reply but it doesn't show up. Maybe I lost my connection while I submitted it. Anyways, regarding all the possible way for obtaining items in the game and all possible currencies that can be used, I'd say: let's understand all possible ways for obtaining items. There are surely many ways, for TM100 I see Spheres, League Points, Berry points, Candies... So it's a mess. We could either have the {
"id": 305,
"name": "some-item-name",
"fling_power": null,
"fling_effect": null,
"category": {
"name": "held-items"
},
"prices": [
{
"purchase_price": "$3000",
"sell_price": "$1500",
"version_group": {
"name": "red-blue",
"url": "https://pokeapi.co/api/v2/version-group/1/"
}
},
{
"purchase_price": "5 Spheres",
"sell_price": "3 candies",
"version_group": {
"name": "red-blue",
"url": "https://pokeapi.co/api/v2/version-group/1/"
}
},
...
]
}or {
"id": 305,
"name": "some-item-name",
"fling_power": null,
"fling_effect": null,
"category": {
"name": "held-items"
},
"prices": [
{
"purchase_price": ["$3000","2 Battle exp point"],
"sell_price": ["$1500","3 Candies"],
"version_group": {
"name": "red-blue",
"url": "https://pokeapi.co/api/v2/version-group/1/"
}
},
...
]
}This way doesn't account for conditions though. More over the price maybe changes based on the location where it's purchased. I'm not that knowledgable. |
This might be difficult for users to parse and work with. Could we add a new id,identifier,name
1,poke-dollar,Poké Dollar
2,battle-point,Battle Point
3,sphere,Sphere
4,candy,Candy
5,berry-point,Berry Point{
"purchase_price": 3000,
"sell_price": 1500,
"currency_id": 1,
"version_group": {
"name": "red-blue",
"url": "https://pokeapi.co/api/v2/version-group/1/"
}
} |
|
Could be good! Let's list them here first |
id,identifier
1,poke-dollar
2,coin
3,volcanic-ash
4,poke-coupon
5,berry-powder
6,battle-point
7,sphere
8,castle-point
9,watt
10,athlete-point
11,dream-point
12,dream-world-berry
13,poke-mile
14,festival-coin
15,poke-bean
16,home-point
17,merit-point
18,league-point
19,blueberry-pointid,language_id,name
1,9,Pokémon Dollar
2,9,Coin
3,9,Volcanic Ash
4,9,Poké Coupon
5,9,Berry Powder
6,9,Battle Point
7,9,Sphere
8,9,Castle Point
9,9,Watt
10,9,Athlete Point
11,9,Dream Point
12,9,Berry (Dream World)
13,9,Poké Mile
14,9,Festival Coin
15,9,Poké Bean
16,9,Pokémon HOME Point
17,9,Merit Point
18,9,League Point
19,9,Blueberry PointI think we can go with these options from Bulbapedia. Some of them might not be very popular, but I believe it's better to list them all. |
|
Ok as a starting point. In future we can extend the currency table with info about which game was introduced in, or in which game it is usable. We can even add the prose so we can translate it and have a small description. |
Add ItemPrice model and exposes per-version item pricing data
data/v2/csv/item_prices.csvItem.costfield in favor of the new structured pricing model.Closes #1406 and #1397, #1398
Example REST API response
{ "id": 305, "name": "some-item-name", "fling_power": null, "fling_effect": null, "category": { "name": "held-items" }, "prices": [ { "is_purchasable": true, "purchase_price": 3000, "sell_price": 1500, "version_group": { "name": "red-blue", "url": "https://pokeapi.co/api/v2/version-group/1/" } }, { "is_purchasable": false, "purchase_price": null, "sell_price": 1500, "version_group": { "name": "ruby-sapphire", "url": "https://pokeapi.co/api/v2/version-group/3/" } } ] }Example GraphQL queries
v1beta: item with prices
v1beta2: item with itemprice relation
{ "data": { "item": [ { "id": 305, "name": "tm01", "cost": null, "itemnames": [ { "name": "TM01" } ], "itemprices": [ { "is_purchasable": true, "purchase_price": 3000, "sell_price": 1500, "versiongroup": { "id": 1, "name": "red-blue", } }, { "is_purchasable": false, "purchase_price": null, "sell_price": 1500, "versiongroup": { "id": 5, "name": "ruby-sapphire", } } ] } ] } }