@@ -73,7 +73,7 @@ const parseStatisticData = statisticData => {
7373/**
7474 * @class
7575 */
76- AV . Leaderboard = function ( statisticName ) {
76+ AV . Leaderboard = function Leaderboard ( statisticName ) {
7777 /**
7878 * @type {string }
7979 */
@@ -224,7 +224,7 @@ _.extend(
224224 } ) . then ( data => this . _finishFetch ( data ) ) ;
225225 } ,
226226 _getResults (
227- { skip, limit, selectUserKeys, includeStatistics } ,
227+ { skip, limit, selectUserKeys, includeStatistics, version } ,
228228 authOptions ,
229229 self
230230 ) {
@@ -242,6 +242,7 @@ _.extend(
242242 includeStatistics : includeStatistics
243243 ? ensureArray ( includeStatistics ) . join ( ',' )
244244 : undefined ,
245+ version,
245246 } ,
246247 authOptions,
247248 } ) . then ( ( { results : rankings } ) =>
@@ -268,15 +269,16 @@ _.extend(
268269 * @param {number } [options.limit] The limit of the number of results.
269270 * @param {string[] } [options.selectUserKeys] Specify keys of the users to include
270271 * @param {string[] } [options.includeStatistics] Specify other statistics to include in the Rankings
272+ * @param {number } [options.version] Specify the version of the leaderboard
271273 * @param {AuthOptions } [authOptions]
272274 * @return {Promise<Ranking[]> }
273275 */
274276 getResults (
275- { skip, limit, selectUserKeys, includeStatistics } = { } ,
277+ { skip, limit, selectUserKeys, includeStatistics, version } = { } ,
276278 authOptions
277279 ) {
278280 return this . _getResults (
279- { skip, limit, selectUserKeys, includeStatistics } ,
281+ { skip, limit, selectUserKeys, includeStatistics, version } ,
280282 authOptions
281283 ) ;
282284 } ,
@@ -286,15 +288,16 @@ _.extend(
286288 * @param {number } [options.limit] The limit of the number of results.
287289 * @param {string[] } [options.selectUserKeys] Specify keys of the users to include
288290 * @param {string[] } [options.includeStatistics] Specify other statistics to include in the Rankings
291+ * @param {number } [options.version] Specify the version of the leaderboard
289292 * @param {AuthOptions } [authOptions]
290293 * @return {Promise<Ranking[]> }
291294 */
292295 getResultsAroundUser (
293- { limit, selectUserKeys, includeStatistics } = { } ,
296+ { limit, selectUserKeys, includeStatistics, version } = { } ,
294297 authOptions
295298 ) {
296299 return this . _getResults (
297- { limit, selectUserKeys, includeStatistics } ,
300+ { limit, selectUserKeys, includeStatistics, version } ,
298301 authOptions ,
299302 true
300303 ) ;
0 commit comments