Comments (31)
This wouldn't be very performance friendly either, as it would, once an hour, request all of the prices. Maybe at initial installation, it'll request them all (or if you do not have any in local storage already) & then if the result is (maybe user defined?) over an hour old, then it'll request it again?
from loungedestroyer.
Don't think it is that bad. It is only one request per hour to our future JSON API, and it easily allows to have a market price for all items on CSGL without delay. The pros outweigh the cons anyway. At the moment market price loading for inventories takes way too much time too if your inventory is huge (100+ items).
There is already another extension that is doing the same actually, but I believe it is 4 hour interval instead. https://chrome.google.com/webstore/detail/csgoloungecom-prices/hgbdpagnjbkhoadnmjcaainaclkmhfla
from loungedestroyer.
Hmm, probably true. Just make sure not to get rate-throttled for the initial request.
from loungedestroyer.
You misunderstood and I didn't explain it properly, the JSON API will be LoungeDestroyer's, hosted on my webserver. It will return all CS:GO items market values at once, single request. The application on my server would fetch steam market prices periodically and store in a database, then cache the response for LD users.
from loungedestroyer.
Ah, that makes more sense. If you put it into one large array, I'm sure you could reduce the bandwidth waste. What about the CPU/sudden BW load on the client side? Would you somehow throttle that, or just let it overload for a few seconds at most?
from loungedestroyer.
Bandwidth shouldn't be a concern since it's just a JSON (list of weaponName => marketValue), and not sure about CPU load but it will just save the API response straight away to Chrome Local Storage. Besides I am already doing two other tasks in the background with AJAX requests: 1) New match checking 2) CS:GO Lounge bot status
from loungedestroyer.
Okay, awesome. Great idea however. Hopefully it'll work out just fine in practice.
from loungedestroyer.
Yep, just need to write it. :( Or find already existing solution.
from loungedestroyer.
Wish I could help, but JS isn't my language :P - Good luck though.
from loungedestroyer.
It doesn't need to be JS since its a server application, it can be PHP if you want.
from loungedestroyer.
http://csgo.steamanalyst.com/jsonList.php Could reuse this on web application.
from loungedestroyer.
How frequent does this update?
from loungedestroyer.
I do not know, but I asked them on subreddit if they have API. http://www.reddit.com/r/steamanalyst/comments/2h1bvf/api_for_developers/
from loungedestroyer.
Possibly save all requested prices to storage, along with timestamp. Then check if item has a price in storage before requesting, and if so, check if timestamp is more than an hour ago. If it is, request new price. Otherwise, load from storage.
from loungedestroyer.
Steam API is very poor. I searched for ways to get all marketable items, but I couldn't find a way to get a list of all skins, not even through game files. The classIDs is somewhere located, but I don't know where.
Example API request for an item:
http://api.steampowered.com/ISteamEconomy/GetAssetClassInfo/v0001?key={APIKEY}&format=json&language=en&appid=730&class_count=1&classid0=350539070
After that I figured I could try scraping data from market search instead. Volvo allows to list 100 items per page.
Currency can be forced if you are not logged in.
from loungedestroyer.
Okay, I made some progress, but the market price fetching script needs to be more bullet proof.
from loungedestroyer.
Is this every single item?
from loungedestroyer.
Every item that is on Steam market for CS:GO.
from loungedestroyer.
Swagilicious
from loungedestroyer.
Okay, I made the script more dirtier by applying dirty error handling and retrying for each request (25 requests in total). If anyone wants to see the script, I have it on private repository.
Now to work on the extension part.
from loungedestroyer.
Should we convert the betting value for items too?
from loungedestroyer.
Some progress. I love it how it loads market prices in a lightning speed. 😄 Still not ready to be pushed live though.
from loungedestroyer.
Requesting a file is a fucking stupid idea since it comes uncompressed. 250kb (CS:GO only) without gzip compression. 32kb with gzip. Getting rid of quantity property makes it 25kb.
from loungedestroyer.
Doto2 + CS:GO = 180kb. Hmpph.
from loungedestroyer.
Now with Doto2.
from loungedestroyer.
Is this still something that needs to be done? I say we get an API repo created, use NodeJS (keep it javascript since all contrib's have used it?), and get it hosted on Heroku (free service).
from loungedestroyer.
Apologies for necroing this, I am also looking to write a code that will fetch the market data for all available items.
I have looked at what's available on GitHub but it seems all to fetch the data for single items.
Is there something that does it for all items for a game?
from loungedestroyer.
There is no easy way, sadly.
from loungedestroyer.
Is there another alternative to get all cs:go weapon skins not ony by one ?
from loungedestroyer.
@xscence
All i know - you can take some classids from here
http://api.steampowered.com/ISteamEconomy/GetAssetPrices/v0001?format=json&language=en&appid=730&key={api_key}
and use them like this
http://api.steampowered.com/ISteamEconomy/GetAssetClassInfo/v0001?key={api_key}&format=json&language=en&appid=730&class_count=91%27&classid0=992003612&classid1=992003613&classid2=927007517&classid3=721248158&classid4=638243112&classid5=613589848&classid6=360448780&classid7=259019412&classid8=186150630&classid9=341265706&classid10=191923205&classid11=186150629&classid12=506856209&classid13=506856210&classid14=613589849&classid15=613589850&classid16=613589851&classid17=613589852&classid18=613589853&classid19=613589854&classid20=613589855&classid21=613589856&classid22=613589857&classid23=613589858&classid24=613589859&classid25=613589860&classid26=613589861&classid27=613589862&classid28=613589863&classid29=613589864&classid30=613589865&classid31=613589866&classid32=615451613&classid33=619637866&classid34=619637867&classid35=619637868&classid36=619637869&classid37=619637870&classid38=619637871&classid39=619637872&classid40=619637873&classid41=619637874&classid42=625567400&classid43=625567401&classid44=625567402&classid45=625567403&classid46=625567404&classid47=625567405&classid48=667021859&classid49=667021860&classid50=667021861&classid51=667021863&classid52=667021864&classid53=667021865&classid54=667021866&classid55=667021867&classid56=667021868&classid57=667021869&classid58=667021870&classid59=667021871&classid60=667021872&classid61=667021873&classid62=783092523&classid63=783092524&classid64=783092525&classid65=783092526&classid66=783092527&classid67=783092528&classid68=783092529&classid69=783092530&classid70=783092532&classid71=783092533&classid72=783092534&classid73=783092535&classid74=783092536&classid75=783092537&classid76=783092538&classid77=783092539&classid78=783092540&classid79=945464709&classid80=945464710&classid81=945464711&classid82=945464712&classid83=945464713&classid84=945464714&classid85=945464715&classid86=945464716&classid87=945464717&classid88=945464718&classid89=945464719&classid90=903185406%27
But, anyway, its not full list of items.
from loungedestroyer.
then how most of the bet websites have all items ? And thanks for your response!
from loungedestroyer.
Related Issues (20)
- Trade info filtering box is bugged on home page
- Max bet total should be limited to items that are <= 75 value HOT 1
- Tab focus/creating for options page is broken thanks to a Chromium 49 bug
- Dota prices inaccurate if not base-quality HOT 3
- 'Bellow' typo in update notification
- Remove stream option? HOT 2
- Decrease the amount of notifications
- Use 3rd party Steam market API
- [Request] Button to scroll down the page to bets HOT 3
- Wear status disappears on hover in search HOT 1
- GlassLounge theme: some objects overlap HOT 1
- CleanLounge Night theme: Make trades more distinguishable from each other HOT 1
- Redundant entry: "Show Steam market price" HOT 3
- Retest the 'open new tab if not exist' API bug HOT 1
- Suggestion: When click open to steamanalyst of that object HOT 1
- Inventory loading should clear setTimeout when cancelling it
- Extended match information is broken due to new coin update
- Auto-bump not working due to incorrect redirect to HTTPS HOT 6
- New bug auto bump csgolounge HOT 2
- New error for auto bump dota2lounge/csgolounge 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 loungedestroyer.