@@ -47,7 +47,7 @@ public static List<ScriptObject> GetFrontPageScripts(int pageNumber = 1)
4747 throw new ScriptBloxException ( "An error has occured while fetching the json, please submit a bug report." ) ;
4848 if ( jsonReturn [ "message" ] != null )
4949 throw new ScriptBloxException ( jsonReturn . Value < string > ( "message" ) ) ;
50- if ( jsonReturn [ "script " ] == null )
50+ if ( jsonReturn [ "scripts " ] == null )
5151 throw new ScriptBloxException ( "Backend error occured." ) ;
5252
5353 List < string > slugsToCheck = GetSlugsFromResults ( jsonReturn ) ;
@@ -82,7 +82,7 @@ public static List<ScriptObject> GetScriptsFromQuery(string searchQuery, int max
8282 throw new ScriptBloxException ( "An error has occured while fetching the json, please submit a bug report." ) ;
8383 if ( jsonReturn [ "message" ] != null )
8484 throw new ScriptBloxException ( jsonReturn . Value < string > ( "message" ) ) ;
85- if ( jsonReturn [ "script " ] == null )
85+ if ( jsonReturn [ "scripts " ] == null )
8686 throw new ScriptBloxException ( "Backend error occured." ) ;
8787
8888 List < string > slugsToCheck = GetSlugsFromResults ( jsonReturn ) ;
@@ -102,13 +102,13 @@ public static List<ScriptObject> GetScriptsFromUser(string username)
102102 {
103103 List < ScriptObject > scriptsToReturn = new List < ScriptObject > ( ) ;
104104
105- JToken jsonReturn = JToken . Parse ( MiscFunctions . HttpClient . GetStringAsync ( $ "https://scriptblox.com/u/ { username } ") . Result ) ;
105+ JToken jsonReturn = JToken . Parse ( MiscFunctions . HttpClient . GetStringAsync ( $ "https://scriptblox.com/api/user/scripts/ { username } ?page=1 ") . Result ) ;
106106
107107 if ( jsonReturn == null )
108108 throw new ScriptBloxException ( "An error has occured while fetching the json, please submit a bug report." ) ;
109109 if ( jsonReturn [ "message" ] != null )
110110 throw new ScriptBloxException ( jsonReturn . Value < string > ( "message" ) ) ;
111- if ( jsonReturn [ "script " ] == null )
111+ if ( jsonReturn [ "scripts " ] == null )
112112 throw new ScriptBloxException ( "Backend error occured." ) ;
113113
114114 List < string > slugsToCheck = GetSlugsFromResults ( jsonReturn . ToString ( ) ) ;
0 commit comments