sir
Account Details
SteamID64 76561198105707824
SteamID3 [U:1:145442096]
SteamID32 STEAM_0:0:72721048
Country Italy
Signed Up December 27, 2020
Last Posted December 27, 2020 at 10:18 AM
Posts 1 (0 per day)
Game Settings
In-game Sensitivity
Windows Sensitivity
Raw Input  
DPI
 
Resolution
 
Refresh Rate
 
Hardware Peripherals
Mouse  
Keyboard  
Mousepad  
Headphones  
Monitor  
#298 Logs.tf match stats in Projects

I keep geeting HTTP Server response 429 when trying to get the json from the logs

This is my method that makes a request to the Logs.tf api, its written in java. Currently i basically get a List of Logs from a player(with having the limit set to 100, it works with having the limit set to 50 though) using the http://logs.tf/api/v1/log?player=Z&limit=X link and then parsing them one by one. First I Call this method to get the JSON and then a diffrent one to parse it, but around halfway through I get a 429 with the lmit set to 100.
My question is: is the Requestlimit the problem here or is my method somehow wrong?

    //Gets the JSON String from a logURL
    String getLogJson(URL logURL){
        StringBuilder content = new StringBuilder();
        try {
            //Connect to Logs.tf and request a Log
            HttpURLConnection con = (HttpURLConnection) logURL.openConnection();
            con.setRequestMethod("GET");

            //Reads the log JSON
            BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
            String inputLine;
            while ((inputLine = in.readLine()) != null) {
                content.append(inputLine);
            }

            //closes the connection
            in.close();
            con.disconnect();

        } catch (IOException e) {
            System.err.println("Connection Error");
            e.printStackTrace();
        }

        //return the full json String
        return content.toString();
    }
posted about 3 years ago