Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gamebetr/api-client-js",
"version": "1.0.11",
"version": "1.0.12",
"description": "Gamebetr API client library",
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions src/Services/leaderboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@ export default class Leaderboard {

list(type, period, currency = '') {
let path = '';
let tag = '';
let category = '';
switch (type) {
case 'most_bets_casino':
path = 'most-bets';
tag = 'casino';
category = 'casino';
break;
case 'top_bet_casino':
path = 'top-bet';
tag = 'casino';
category = 'casino';
break;
case 'most_bets_sports':
path = 'most-bets';
tag = 'sports';
category = 'sports';
break;
case 'top_bet_sports':
path = 'top-bet';
tag = 'sports';
category = 'sports';
break;
}
let currency_filter = '';
// if (currency != '') {
currency_filter = '&filter[display-currency.display-unit]=' + currency;
// }
let endpoint ='leaderboard/reports/' + path + '?page[size]=50&filter[tags][]=' + tag + '&filter[period]=' + period + currency_filter;
let endpoint ='leaderboard/reports/' + path + '?page[size]=50&filter[service-category]=' + category + '&filter[period]=' + period + currency_filter;
let client = new Client(this.config);
return client.request('GET', endpoint);
}
Expand Down