Initial Leaderboard API added
This commit is contained in:
parent
014722c694
commit
e55e206d7d
1 changed files with 85 additions and 0 deletions
|
@ -17,6 +17,8 @@ export class ApiService {
|
|||
}
|
||||
}
|
||||
|
||||
// Login API
|
||||
|
||||
private getSessionKey() {
|
||||
console.log('get key');
|
||||
return this.sessionKey;
|
||||
|
@ -69,4 +71,87 @@ export class ApiService {
|
|||
data
|
||||
).map( response => response.json() );
|
||||
}
|
||||
|
||||
// Leaderboard Api
|
||||
|
||||
private leaderboard_daily_total() {
|
||||
return this.http.post(
|
||||
this.apiUrl + '/stats/leaderboard',
|
||||
{
|
||||
session_key : this.sessionKey,
|
||||
type : 'daily_total'
|
||||
}
|
||||
).map( response => response.json() );
|
||||
}
|
||||
|
||||
private leaderboard_daily_count() {
|
||||
return this.http.post(
|
||||
this.apiUrl + '/stats/leaderboard',
|
||||
{
|
||||
session_key : this.sessionKey,
|
||||
type : 'daily_count'
|
||||
}
|
||||
).map( response => response.json() );
|
||||
}
|
||||
|
||||
private leaderboard_weekly_total() {
|
||||
return this.http.post(
|
||||
this.apiUrl + '/stats/leaderboard',
|
||||
{
|
||||
session_key : this.sessionKey,
|
||||
type : 'weekly_total'
|
||||
}
|
||||
).map( response => response.json() );
|
||||
}
|
||||
|
||||
private leaderboard_weekly_count() {
|
||||
return this.http.post(
|
||||
this.apiUrl + '/stats/leaderboard',
|
||||
{
|
||||
session_key : this.sessionKey,
|
||||
type : 'weekly_count'
|
||||
}
|
||||
).map( response => response.json() );
|
||||
}
|
||||
|
||||
private leaderboard_monthly_total() {
|
||||
return this.http.post(
|
||||
this.apiUrl + '/stats/leaderboard',
|
||||
{
|
||||
session_key : this.sessionKey,
|
||||
type : 'monthly_total'
|
||||
}
|
||||
).map( response => response.json() );
|
||||
}
|
||||
|
||||
private leaderboard_monthly_count() {
|
||||
return this.http.post(
|
||||
this.apiUrl + '/stats/leaderboard',
|
||||
{
|
||||
session_key : this.sessionKey,
|
||||
type : 'monthly_count'
|
||||
}
|
||||
).map( response => response.json() );
|
||||
}
|
||||
|
||||
private leaderboard_all_time_total() {
|
||||
return this.http.post(
|
||||
this.apiUrl + '/stats/leaderboard',
|
||||
{
|
||||
session_key : this.sessionKey,
|
||||
type : 'all_time_total'
|
||||
}
|
||||
).map( response => response.json() );
|
||||
}
|
||||
|
||||
private leaderboard_all_time_count() {
|
||||
return this.http.post(
|
||||
this.apiUrl + '/stats/leaderboard',
|
||||
{
|
||||
session_key : this.sessionKey,
|
||||
type : 'all_time_count'
|
||||
}
|
||||
).map( response => response.json() );
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue