Compare commits
2 Commits
7b3ab8e115
...
e2d3a57629
Author | SHA1 | Date | |
---|---|---|---|
e2d3a57629
|
|||
083b8960aa
|
@ -51,6 +51,9 @@ local STRAFESNET_API_ENDPOINTS = {
|
|||||||
},
|
},
|
||||||
TIMES = {
|
TIMES = {
|
||||||
LIST = "time",
|
LIST = "time",
|
||||||
|
WORLD_RECORD = {
|
||||||
|
GET = "time/worldrecord"
|
||||||
|
},
|
||||||
GET = "time/%d"
|
GET = "time/%d"
|
||||||
},
|
},
|
||||||
USERS = {
|
USERS = {
|
||||||
@ -79,9 +82,9 @@ end
|
|||||||
function StrafesNET.ListRanks(GameId, ModeId, StyleId, SortBy, PageSize, PageNumber)
|
function StrafesNET.ListRanks(GameId, ModeId, StyleId, SortBy, PageSize, PageNumber)
|
||||||
local RequestUrl = STRAFESNET_API_URL .. STRAFESNET_API_ENDPOINTS.RANKS.LIST
|
local RequestUrl = STRAFESNET_API_URL .. STRAFESNET_API_ENDPOINTS.RANKS.LIST
|
||||||
local Params = {
|
local Params = {
|
||||||
gameId = GameId,
|
game_id = GameId,
|
||||||
modeId = ModeId,
|
mode_id = ModeId,
|
||||||
styleId = StyleId,
|
style_id = StyleId,
|
||||||
sort_by = SortBy or 1,
|
sort_by = SortBy or 1,
|
||||||
page_size = PageSize or 10,
|
page_size = PageSize or 10,
|
||||||
page_number = PageNumber or 1
|
page_number = PageNumber or 1
|
||||||
@ -104,6 +107,20 @@ function StrafesNET.ListTimes(UserId, MapId, GameId, ModeId, StyleId, SortBy, Pa
|
|||||||
return Request("GET", RequestUrl, Params, Headers)
|
return Request("GET", RequestUrl, Params, Headers)
|
||||||
end
|
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)
|
function StrafesNET.GetTime(TimeId)
|
||||||
local RequestUrl = STRAFESNET_API_URL .. STRAFESNET_API_ENDPOINTS.TIMES.GET:format(TimeId)
|
local RequestUrl = STRAFESNET_API_URL .. STRAFESNET_API_ENDPOINTS.TIMES.GET:format(TimeId)
|
||||||
return Request("GET", RequestUrl, nil, Headers)
|
return Request("GET", RequestUrl, nil, Headers)
|
||||||
|
Reference in New Issue
Block a user