Comments (10)
With the current structure I will not add the wear to the name because a lot of data would be repeated. I can add a property
named wears
with all the wears.
{
"id": "skin-65604",
"name": "Desert Eagle | Urban DDPAT",
"description": "As expensive as it is powerfu...",
"weapon": "Desert Eagle",
"pattern": "Urban DDPAT",
"min_float": 0.06,
"max_float": 0.8,
"rarity": "Consumer Grade",
"stattrak": false,
"image": "https://steamcdn-a.akamaihd.n..."
"wears": ["Factory New", "Minimal Wear", "..."]
}
from csgo-api.
Okay
from csgo-api.
@hackeryutu You can propose me a better structure if you think is better for the general use of this API.
from csgo-api.
@ByMykel I think your data structure is very good
from csgo-api.
With the current structure I will not add the wear to the name because a lot of data would be repeated. I can add a property named
wears
with all the wears.{ "id": "skin-65604", "name": "Desert Eagle | Urban DDPAT", "description": "As expensive as it is powerfu...", "weapon": "Desert Eagle", "pattern": "Urban DDPAT", "min_float": 0.06, "max_float": 0.8, "rarity": "Consumer Grade", "stattrak": false, "image": "https://steamcdn-a.akamaihd.n..." "wears": ["Factory New", "Minimal Wear", "..."] }
Having the min-max values of a specific wear would make the API much better. For example, in buff163 you can look for a specific weapon in a specific wear such as "Factory new" and see the min and max float values for "Factory new" of that specific item.
You can add nested objects which contain the wears and their respective min-max float values.
Would be pretty useful for many developers, although items_game.txt doesn't seem to contain that data so it would have to be scraped from somewhere else.
from csgo-api.
@ErezShahaf If I'm not mistaken the min and max float values for every wear are the same:
But one thing I did't notice before, that the images are not the same for all wears:
I could do something with nested objects to display the different images for every wear but I can't find all the images.
For example for 'AWP | Corticera' I have 3 different images, but for the most of the skins I only have one.
"econ/default_generated/weapon_awp_cu_favela_awp_heavy_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_heavy_large.e7e7ee23215e0ccfb22d39500522a0e4128500fa.png",
"econ/default_generated/weapon_awp_cu_favela_awp_light_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_light_large.4329c047ea1899f3846a1a81539ba2a27665a54e.png",
"econ/default_generated/weapon_awp_cu_favela_awp_medium_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_medium_large.7578b4d3233ca9d1e47cf51e6fd26fb38048a5ba.png",
from csgo-api.
@hackeryutu Until we find a better structure for the skins I think you can calculate the wears yourself using this image:
from csgo-api.
@ErezShahaf If I'm not mistaken the min and max float values for every wear are the same:
But one thing I did't notice before, that the images are not the same for all wears:
I could do something with nested objects to display the different images for every wear but I can't find all the images.
For example for 'AWP | Corticera' I have 3 different images, but for the most of the skins I only have one.
"econ/default_generated/weapon_awp_cu_favela_awp_heavy_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_heavy_large.e7e7ee23215e0ccfb22d39500522a0e4128500fa.png", "econ/default_generated/weapon_awp_cu_favela_awp_light_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_light_large.4329c047ea1899f3846a1a81539ba2a27665a54e.png", "econ/default_generated/weapon_awp_cu_favela_awp_medium_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_medium_large.7578b4d3233ca9d1e47cf51e6fd26fb38048a5ba.png",
That would have made things easier, unfortunately each weapon has different ranges for their wear names. For example, one factory new could be between 0 to 0.06 and for the other weapon it could be from 0.02 to 0.1.
What you noticed in your image is the spray pattern, which also complicates things if you wanted to do it perfectly. For the floats you could just scrape the data once from somewhere else but if you wanted the accurate image it requires a server and SteamUser/NodeCSGO packages in order to send a request to the game coordinator. Another thing that you could do is scrape each image pattern if you wanted it to be more or less accurate (There are other things which may alter how the weapon looks, the skins are dynamic).
It's up to you if you want to do something about it, I just wanted to let you know that those differences exist. I don't know who this API is intended for but I personally think that the floats are by far more important.
from csgo-api.
That would have made things easier, unfortunately each weapon has different ranges for their wear names. For example, one factory new could be between 0 to 0.06 and for the other weapon it could be from 0.02 to 0.1.
@ErezShahaf Could you give one example?
I definitely want to add nested objects so I can add extra things like market hash name, accurate images for every wear, float values, etc. But I think that woud be some kind of hard to do without scraping some site.
from csgo-api.
@hackeryutu Deployed. Sorry for the delay I should have added this before.
from csgo-api.
Related Issues (20)
- Missing category on some skins. HOT 4
- Missing graffiti colors and their images HOT 3
- Why are there multiple skin ids HOT 2
- Music kits name translation error HOT 2
- Market hash name error HOT 5
- Gold stickers haven't been released yet in 2016 HOT 2
- About api HOT 7
- Revolution Case skins have no "collections" data HOT 1
- There are two patches with the same name HOT 1
- The name format is different HOT 4
- Please update collections enpoint HOT 1
- The wear degree is incorrectly calculated HOT 1
- The MAC-10 | Case Hardened doesn't have stattrak HOT 1
- item id mismatch HOT 4
- patch-4579 is missing HOT 1
- Add crate item to collection HOT 1
- Improve description for event, stattrak, ... HOT 5
- Update new skin HOT 1
- Kilowatt case is missing the knives HOT 2
- Multiple images are missing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csgo-api.