From 4e8fd51aa8653da8f077a34e1767e4899394914a Mon Sep 17 00:00:00 2001 From: dowoge Date: Sat, 7 Jan 2023 17:17:20 -0500 Subject: [PATCH] add GetBadgesAwardedDate API Method and endpoint --- src/modules/strafes_net.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/strafes_net.lua b/src/modules/strafes_net.lua index 1eb38c2..b4b7d0f 100644 --- a/src/modules/strafes_net.lua +++ b/src/modules/strafes_net.lua @@ -6,6 +6,7 @@ local STRAFESNET_API_URL = 'https://api.strafes.net/v1/' local FIVEMAN_API_URL = 'https://api.fiveman1.net/v1/' local ROBLOX_API_URL = 'https://users.roblox.com/v1/' local ROBLOX_API_URL2 = 'https://api.roblox.com/' +local ROBLOX_BADGES_API = 'https://badges.roblox.com/v1/' local ROBLOX_THUMBNAIL_URL = 'https://thumbnails.roblox.com/v1/' @@ -269,6 +270,14 @@ function API:GetUserOnlineStatus(USER_ID) -- https://api.roblox.com/users/145590 return response,headers end +function API:GetBadgesAwardedDates(USER_ID,BADGE_LIST) + if not USER_ID then return 'empty id' end + local err,res = parseToURLArgs({badgeIds=table.concat(BADGE_LIST,',')}) + if err then return end + local response,headers = http_request('GET',ROBLOX_BADGES_API..'users/'..USER_ID..'/badges/awarded-dates'..res) + return response,headers +end + function API:GetUserThumbnail(USER_ID,TYPE,SIZE) -- https://thumbnails.roblox.com/v1/users/avatar?userIds=1455906620&size=180x180&format=Png&isCircular=false if not USER_ID then return 'empty id' end local _TYPE = self.ROBLOX_THUMBNAIL_TYPES[TYPE] or 'avatar'