summaryrefslogtreecommitdiff
path: root/jb-ui/src/api_fsb/docs/LeaderboardApi.md
blob: a54a22ac954aea80b42c0695e91a28e521d88a73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# LeaderboardApi

All URIs are relative to *https://fsb.generalresearch.com*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet**](#leaderboardwinnersproductidleaderboardtimespanboardcodewinnersget) | **GET** /{product_id}/leaderboard/timespan/{board_code}/winners/ | Leaderboard Winners|
|[**timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet**](#timespanleaderboardproductidleaderboardtimespanboardcodeget) | **GET** /{product_id}/leaderboard/timespan/{board_code}/ | Timespan Leaderboard|

# **leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet**
> LeaderboardWinnerResponse leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet()

Get the Winners of leaderboard contests

### Example

```typescript
import {
    LeaderboardApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LeaderboardApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let boardCode: LeaderboardCode; //The type of leaderboard. What the \"values\" represent.  Allowed values:   - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes  - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout  - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts (default to undefined)
let freq: LeaderboardFrequency; //The time period range for the leaderboard.  Allowed values:   - __daily__ *(DAILY)*: UTC midnight to UTC midnight  - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC  - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 (default to undefined)
let countryIso: string; //Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request. (optional) (default to undefined)

const { status, data } = await apiInstance.leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(
    productId,
    boardCode,
    freq,
    countryIso
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|
| **boardCode** | **LeaderboardCode** | The type of leaderboard. What the \"values\" represent.  Allowed values:   - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes  - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout  - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts | defaults to undefined|
| **freq** | **LeaderboardFrequency** | The time period range for the leaderboard.  Allowed values:   - __daily__ *(DAILY)*: UTC midnight to UTC midnight  - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC  - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 | defaults to undefined|
| **countryIso** | [**string**] | Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request. | (optional) defaults to undefined|


### Return type

**LeaderboardWinnerResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet**
> LeaderboardResponse timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet()


### Example

```typescript
import {
    LeaderboardApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LeaderboardApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let boardCode: LeaderboardCode; //The type of leaderboard. What the \"values\" represent.  Allowed values:   - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes  - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout  - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts (default to undefined)
let freq: LeaderboardFrequency; //The time period range for the leaderboard.  Allowed values:   - __daily__ *(DAILY)*: UTC midnight to UTC midnight  - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC  - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 (default to undefined)
let countryIso: string; //Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request. (optional) (default to undefined)
let bpuid: string; //Brokerage Product User ID. If passed, this results in the filtering of rows to include this user\'s row, plus rows above and below in rank (up to `limit` rows). Otherwise, the top `limit` rows are returned. (optional) (default to undefined)
let withinTime: string; //Any local timestamp falling within the desired leaderboard\'s period. If not passed, uses the country\'s current time period. (optional) (default to undefined)
let limit: number; //Max number of rows to return (optional) (default to 50)

const { status, data } = await apiInstance.timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(
    productId,
    boardCode,
    freq,
    countryIso,
    bpuid,
    withinTime,
    limit
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|
| **boardCode** | **LeaderboardCode** | The type of leaderboard. What the \"values\" represent.  Allowed values:   - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes  - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout  - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts | defaults to undefined|
| **freq** | **LeaderboardFrequency** | The time period range for the leaderboard.  Allowed values:   - __daily__ *(DAILY)*: UTC midnight to UTC midnight  - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC  - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 | defaults to undefined|
| **countryIso** | [**string**] | Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request. | (optional) defaults to undefined|
| **bpuid** | [**string**] | Brokerage Product User ID. If passed, this results in the filtering of rows to include this user\'s row, plus rows above and below in rank (up to `limit` rows). Otherwise, the top `limit` rows are returned. | (optional) defaults to undefined|
| **withinTime** | [**string**] | Any local timestamp falling within the desired leaderboard\'s period. If not passed, uses the country\'s current time period. | (optional) defaults to undefined|
| **limit** | [**number**] | Max number of rows to return | (optional) defaults to 50|


### Return type

**LeaderboardResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)