New endpoint: Get recent world records
This commit is contained in:
@ -51,6 +51,9 @@ local STRAFESNET_API_ENDPOINTS = {
|
||||
},
|
||||
TIMES = {
|
||||
LIST = "time",
|
||||
WORLD_RECORD = {
|
||||
GET = "time/worldrecord"
|
||||
},
|
||||
GET = "time/%d"
|
||||
},
|
||||
USERS = {
|
||||
@ -104,6 +107,20 @@ function StrafesNET.ListTimes(UserId, MapId, GameId, ModeId, StyleId, SortBy, Pa
|
||||
return Request("GET", RequestUrl, Params, Headers)
|
||||
end
|
||||
|
||||
function StrafesNET.GetWorldRecords(UserId, MapId, GameId, ModeId, StyleId, PageSize, PageNumber)
|
||||
local RequestUrl = STRAFESNET_API_URL .. STRAFESNET_API_ENDPOINTS.TIMES.WORLD_RECORD.GET
|
||||
local Params = {
|
||||
user_id = UserId,
|
||||
map_id = MapId,
|
||||
game_id = GameId,
|
||||
mode_id = ModeId,
|
||||
style_id = StyleId,
|
||||
page_size = PageSize or 10,
|
||||
page_number = PageNumber or 0
|
||||
}
|
||||
return Request("GET", RequestUrl, Params, Headers)
|
||||
end
|
||||
|
||||
function StrafesNET.GetTime(TimeId)
|
||||
local RequestUrl = STRAFESNET_API_URL .. STRAFESNET_API_ENDPOINTS.TIMES.GET:format(TimeId)
|
||||
return Request("GET", RequestUrl, nil, Headers)
|
||||
|
Reference in New Issue
Block a user