3 ms·
That data in API format would be nicer ;-)
by RoryH 11y ago
That data in API format would be nicer ;-)
- guelo 11y agoIt's not that much data. You could copy-paste that into a data structure in your code.
- justicezyx 11y agoYou certainly miss the point of having an API, right?
- tantalor 11y ago$ cat devices.js require('request').get( 'http://www.google.com/design/tool/devices/devices_data.js', function (_, _, body) { var window = {}; eval(body); var entry = window.devicesData.feed.entry[+process.argv[2] + 3]; console.log(entry.device, entry.platform, entry.screendpi); }); $ nodejs devices.js 0 Android One Android 145 $ nodejs devices.js 7 LG G2 Android 141 $ nodejs devices.js 15 Nexus 5 Android 148