league-wrapper
Version:
REST API Wrapper for the League of Legends API
40 lines (33 loc) • 1.07 kB
JavaScript
;
const FeaturedGames = require('../dto/featured-games/featured-games.js');
const Service = require('../service.js');
/**
* @class
* @alias module:LeagueWrapper/service~FeaturedGamesService
* @extends Service
*/
class FeaturedGamesService extends Service {
constructor(api) {
super(api);
}
/**
* @callback module:LeagueWrapper/service~FeaturedGamesService~getAll
* @param {?Error} error
* @param {module:LeagueWrapper/dto/currentGame~FeaturedGames} [data]
*/
/**
* @todo example
* @param {?module:LeagueWrapper/options~RequestOptions} [options]
* @param {module:LeagueWrapper/service~FeaturedGamesService~getAll} [callback]
*
* @return {Promise.<module:LeagueWrapper/dto/currentGame~FeaturedGames>}
*/
getAll(options, callback) {
options = Object.assign({
path: '/observer-mode/rest/featured',
returnType: FeaturedGames
}, options);
return super.request(options).execute(callback);
}
}
exports = module.exports = FeaturedGamesService;