Comparing version 1.3.1 to 1.3.2
@@ -5,3 +5,3 @@ { | ||
"main": "index.js", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "steam", |
@@ -63,2 +63,4 @@ ## SteamAPI | ||
- getAppList() | ||
- getFeaturedCategories() | ||
- getFeaturedGames() | ||
- getGameAchievements(app) | ||
@@ -65,0 +67,0 @@ - getGameDetails(app) |
@@ -78,2 +78,24 @@ const fetch = require('./Fetch'); | ||
} | ||
/** | ||
* Get featured categories on the steam store | ||
* @returns {Promise<Object>>} Featured categories | ||
*/ | ||
getFeaturedCategories() { | ||
return new Promise(async (resolve, reject) => { | ||
const json = await fetch('https://store.steampowered.com/api/featuredcategories', this.headers).catch(reject); | ||
resolve(json); | ||
}); | ||
} | ||
/** | ||
* Get featured games on the steam store | ||
* @returns {Promise<Object>>} Featured games | ||
*/ | ||
getFeaturedGames() { | ||
return new Promise(async (resolve, reject) => { | ||
const json = await fetch('https://store.steampowered.com/api/featured', this.headers).catch(reject); | ||
resolve(json); | ||
}); | ||
} | ||
@@ -101,3 +123,3 @@ /** | ||
if (!appReg.test(app)) return reject('no appid provided'); | ||
const json = await fetch(`http://store.steampowered.com/api/appdetails?appids=${app}`, this.headers).catch(reject); | ||
const json = await fetch(`https://store.steampowered.com/api/appdetails?appids=${app}`, this.headers).catch(reject); | ||
if (!json[app].success) return reject('no app found'); | ||
@@ -107,2 +129,3 @@ resolve(json[app].data); | ||
} | ||
/** | ||
@@ -109,0 +132,0 @@ * Get news for app id |
19712
427
81
25