From 3ac6eb01cf027c79a6f28d3c3e981e29750268b6 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Wed, 30 Nov 2022 07:25:18 -0600 Subject: [PATCH] We can parse the JSON now! --- .gradle/7.4/checksums/checksums.lock | Bin 17 -> 17 bytes .gradle/7.4/checksums/sha1-checksums.bin | Bin 23195 -> 23843 bytes .../7.4/executionHistory/executionHistory.bin | Bin 67340 -> 67340 bytes .../executionHistory/executionHistory.lock | Bin 17 -> 17 bytes .gradle/7.4/fileHashes/fileHashes.bin | Bin 19647 -> 19647 bytes .gradle/7.4/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes .../7.4/fileHashes/resourceHashesCache.bin | Bin 20571 -> 20741 bytes .../buildOutputCleanup.lock | Bin 17 -> 17 bytes .gradle/file-system.probe | Bin 8 -> 8 bytes .../java/main/com/calebfontenot/Common.class | Bin 2635 -> 2922 bytes .../java/main/com/calebfontenot/Main.class | Bin 3556 -> 3559 bytes .../com/calebfontenot/parsers/Velocity.class | Bin 1227 -> 1293 bytes ...inecraft-Updater-Java-1.0-SNAPSHOT-all.jar | Bin 74422 -> 74548 bytes .../compileJava/previous-compilation-data.bin | Bin 564 -> 570 bytes src/main/java/com/calebfontenot/Common.java | 24 ++++++++++-------- src/main/java/com/calebfontenot/Main.java | 2 +- .../com/calebfontenot/parsers/Velocity.java | 2 +- 17 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.gradle/7.4/checksums/checksums.lock b/.gradle/7.4/checksums/checksums.lock index 33575859a51df354b1aac6fbf6c0b4831223e788..b22bc02fc7e2c15ac666a5fece725cc6bb1c0b97 100644 GIT binary patch literal 17 UcmZR+czv(l^>nq<3=psk06t#@YybcN literal 17 UcmZR+czv(l^>nq<3=l8_06tL#UH||9 diff --git a/.gradle/7.4/checksums/sha1-checksums.bin b/.gradle/7.4/checksums/sha1-checksums.bin index 95084f247262ee14884dd7abc7d686aaa338649f..85e718adf2671f40c98aacd8ac19f2ac2f0cc958 100644 GIT binary patch delta 923 zcmbQem2vSd#tkMCjLDNtB_{G0=+>Y8KIaMp7{rK9-YXFxFpa6M?7@kQT@b-&+sUkw z76S9l%%@&0-M$$j7&UvcspJfSoowOH$~swILRA(|J}S9E;QX_j``C8eYJmvGcu&ri zY7ltz(jaf6sMRW{O7_i9r5qRq1RhQ0cavashAM5GEGsjUpXvYKMg7M!p(^>f+|DvOrP)n&TVyM&GH2>fb(juiOTKxE^Plrw)QeP{Fs8Q{_(x zRIFWp-TQ;l5vZy6C#xzrF>yw2RQw^n(cl2zW=D@Gp?YJWtS%6%g0KjWjQOJA=???# zA2IEj`u1UF4)3}}3=E7dCwdbuK#ciy8%P_W>N1pJxLoGD{g?I9Pq|#DBOIQpgaADa z(pB~btV{UG8cbblen;>9SbtV<)qkNP<718s%O1YIQVh{n$pO~J=zI=STVT5Uy}hQ* zADKdaZFt09cV&*7SO7#<)d8?BrUS1rb?JSOC{)?~r|PYN#g+eel^kEp)HDa_sz1?N zqXX8)CKipU&DnoT(5K^e9+UFC*Tl_zQM3BEcrL`US|6}3x$ZbjU9SSRx^Fxl)ST9z@XY-5uK#zkWsp$>G^o78vMvvO-M?R%-%s8aJ>9@lCDW^o&xfZFKdO@_c+yQH2 o)a1d`_B+>-oiiuQHGW~&u1Ee;oQtkSCqs0#LF{61&j;xO09MKi(*OVf delta 82 zcmV-Y0ImO{x&fQD0kAX}0aueX7?G3S7)O&m88DND8IY4L8mN=)8hEpP8#n=z%^Z=l ob{z)+vy~nQ0h6^KsFQUdz>`fOIsyneu_5>uu`u8dvq4B&5*Cym&j0`b diff --git a/.gradle/7.4/executionHistory/executionHistory.bin b/.gradle/7.4/executionHistory/executionHistory.bin index 791bd5ffee2ef87b4e773592c98518eb0e8d815f..4ac08c3fbd8f93711d03be1d0d28c78d0f4e1931 100644 GIT binary patch delta 552 zcmeC_W9jK*+2Hq1sjSE-sj%EAGczyUEG4NpE32x&EUnVixFC}O0xUL9OcG$;-0(4< zN#LwogT;DzU|L0<%wOi)C|6kv^v!u*cfanN zyy0xkWRL6ow#uu6jMqu>bk%EEv@=NLY5qU4<>(oMS7MCazKNN6ddWG7#l;K)Gk3fV zYS0ihw5<=D(zj!w$9J%*=acV!b4@wOAAP%T+f(C-iu-r1tXaw5d=g|rFBda|fbac4 zZ~n{YedID&{T!ET-vJ73HJf(dsQLH*UuqgJHe9hW0Se83D^d68N<#MCEkTw)Zd=>} z3hC*r^f~5q_|~M}AA9C}`nqfLx$Dyz{d6bh<#aAtxRP`FrjnLfYeL(>Htk|zVPs(7 z`eDq#z#_BGl%72Q%XgtUKMzZa%?`8@pTGS1;i%hL zj4LL8e4spe!dI5b=f9c@+`lnN*}X6H{a4uuu}>0J9!%bFwq~-&b$;6!F;P}^w_3M< z*Z1?`S&_|qWdFq-XADk@Fn0SUX6ET7=Oh*vGYHI@5!>BzW0RAkzOJRX#v-2HC+~o& zo=m>?%{7HLQXq1U)K%HoXAf&Q5;YD&vrSmt$V|3S;gq91GyoqM(vq-u#u*OkJU8R};5elPr_Q~GQ3 zx$Dyz{gTUC3U^pAuo_!cA4}|gzJDUv6VAzUI-uo+J z^O2wDIE2u{fN}n0#xIi7_cAf2VEBByAv5D5Mj>=hGp+;%x5ji{Rz^n*$8V2gW$b5^ gmwV;${D8!fPuG6svTTlBSHBkQ`fW$S&gVS?0Dzq6FaQ7m diff --git a/.gradle/7.4/executionHistory/executionHistory.lock b/.gradle/7.4/executionHistory/executionHistory.lock index 473f98c95a77370a9c1ee68a78a4c1834ef393d9..8d2ab50da7d33d2fc02c85ca1ddb489249332378 100644 GIT binary patch literal 17 VcmZRcxW#2xqpHY!1~6cZ1^_Q<1N;C0 literal 17 VcmZRcxW#2xqpHY!1~6ds0RS&r1ML6+ diff --git a/.gradle/7.4/fileHashes/fileHashes.bin b/.gradle/7.4/fileHashes/fileHashes.bin index fa2e27ea451964b74019e587143db14a7ff93016..d81f9093b5986a0332aee77503579a79d9dc8b06 100644 GIT binary patch delta 348 zcmdl#lX3q{#tqe;3c3^XaypkRT**0oQ%TFLHK7a)j4dbDsNV1t%vB~&YIlsT^4j^N733Nr^;3;UjOuM7R&ZmU_}d;mOvCS&cHPGAb<4j zzHLv9Co1mWwX$X<)FCR(5FM<%z(7!&T=Jl5Af}!@$2PNUblioY|Xw}DVz0Qx~R5NVcEg2U`1@x(jki2oq#l&u`^<#tmW{IGI)Q zhrp|Zpi?^w@|d84k0*bXe8?}nihG;xF;A%2{LN>j444FxHN7vkuZWC>ibik#D#OIc z#OAnB@rU?EgByaI9X+Ht>WzWYl0Ym7!UDf7Q#K_mNDM2!;^8}e&FqOlK{-?vYq!jO z|G&O-%h_)?=J~di@5WS-=yZo|)1y=BBfH Zm`cvNRoJE9;ry@VxcGD5&Gp?N6#y;%SKa^s delta 52 zcmV-40L%Y{q5<2W0kAX}0X>s77?6|Q7)X;n8Ss-u8ricp8z%yjbshQw1gVx literal 17 VcmZR6{dF1Nt)mXd7{Gw32LMCP1c diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index e36883f797c8f9d2d3ed5f4879ea134b134d003d..3ead959cef1259a4b6856f6fb9e9342098a41afb 100644 GIT binary patch literal 8 PcmZQzU~Dq!G&3~FBFLbEMnv{;i?SG_5;4Fq7#0o2m^4E%3=G|qo*tF#i`n<} z2js<9k_Sk__a%ACL;ga3N%DP(In~`PBl?iAbXDJ~x^?ck=T`Oa|NQhbfXDDn1Vt#; zp&1CFM4)oPylKWVrj?3~%`C{ID^PMKZKd6_0>!OuS0X4ySVzP_84Q8?q`eeNni)AW zXIrkcY&SMwFD==YK&fNi8kBBwUZABlzU6kpb<$RUM}z#02U*bJ~tw z$j{A5N6wB*b5=S!jtN9J#)hnH-X#ucF8RZ1{Rsmn@u)z=&PvN46xh=mL`09f}`kF$?Fqn4{~we?443jLhHsEwd^q_Wowy_r{5oc+`u`US5jjT@w6oc zc5eXkBphf>`5G|rgc5itnXz+H$KXb;y@`|aj(y9V$;b#U;zj0!mzYO8uax04Kw2)dI0EWP z;-o;;P$nZ&X6C?oC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z3bO2I#v z5qU-}mnsHRUU~(Qa(C6hZU1WFsM+q*uXVE|x@dWsCBFYige>QrN%>656}Q0X2WwSd zk(}PO(~gzWwk3Tp5FZbo>*YGn`X)aTGiIskq*miXKV!4`oNZEc+BW^aYbGemez^C`|&uniAxK>Wm; z5bp3Qhk-`C&#N9xzz6t{PchuZJ%X?})XsSt`+nGjnkGPOW)pgP6V2(Nb+op1Y@llc zMrwE+J?Vt<6!V+tO&iJvUQdLL@UeBgk%(;KXnF$!3AJG~+8H$>>ljqBKjNSf>5Q)9 z_#Zfxh#9I8`vs#R-2O5uR=55#)I^k^<3@B%Hmm4PD8Y?RV8sZpy=_8oLy++IhWDq6pHDqDYiZSw8 zM2=cs#VD4DuJXGyk7ZU!=8te61uFi8-V|Z;j*4@AldZff@s2sfH~1JX=aktiJqyr0 zqE*Xg`YFJqiVIt09gO*X6OOa*Nt9XAyEJWQM0W`4%CwwZNY=ipq;@!NS@2xiFY1g8DA z!M8j?yMaD(JWQ#N@WVZTK@9PmJ;0emL^#a($5}Ci6o&bs7-3zUhv9^8?b9bv|#b~OuNce`t5v>{07HG?V1?wycgjJtGNMW1ngcbPIm-e&& E0J|JyS^xk5 diff --git a/build/classes/java/main/com/calebfontenot/Main.class b/build/classes/java/main/com/calebfontenot/Main.class index aa347c6fc47f86e368d83dbc0757e6bd18dc6d66..255939cb7e376c6ea3946862ab05e83e25e4533a 100644 GIT binary patch delta 22 dcmaDN{akv31`8)gL1IyHs&{JTW<8c|oB&@32iE`q delta 19 acmaDZ{X}|$1`8W&L1IyH>SjZhZJYo{#RjVY diff --git a/build/classes/java/main/com/calebfontenot/parsers/Velocity.class b/build/classes/java/main/com/calebfontenot/parsers/Velocity.class index e7aec235836f287ecf05360cd4eb061cdde72ced..8eb6cbde5d3f4c5151044fd64c879822e485bd47 100644 GIT binary patch delta 348 zcmYL@y)r{_5XFCcZ{j9@7n4g6lK3Vr5#J(2lF}2Xj4?x@GdzGNP-Om%E~C{&fk~lK zMddX-gt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;4xll7(=en(ef|=#9m0^RVch*R(tvo360M`?ex)IG`09q8 zWCWHy;*}SEXU^p}#l>CP($Ye%;zPkD?l6aBeVRkZtyANzQ`FX}=T;EWL}c{NI_eaV z82%yu*MA-xO3i=XX~0%ci=Eq7E7S`Y{{;GBY<~iqFwN6*2PaDpy!_*=&;vJE|9@Ko z^v}o-+xXL@;Nm9wr=wwfzIrBv{|wmwS`Y{dTEAIw@mv=paJFaS7`*zQ3Dy>X@at&- zV4DA;_*+c>!vV?<6DB#Q5NAD?+c?QNsc1Kg`$Q z0GwXotbQ*aXXO8(#-Yy^0SBBP91sV`!EhCDKn_sBZNLFV@Gu|NjUSFfApl;00q2hZ z6aaEuJpxbzPe@|DrC>M&)7jxsqOm1tX54KS0E)ZM1i-+{me>$0dR)<;MRy!CGeC!1 zV*-T1i+?7X00`&G45$Lvah1$~F8KE=9KZsof+w1>-Ys0`JiGt~m(Bv{fLq#dt1N&P zn4%q9)DFizVF#dC%?{|5e@~#f9T&`cmXL2Jmb?pr8$3ryjsG{IYz#-v2B?6!=CLjF zjJVruXDQPzV=I;!{=+x50ww#G4~3gy18xFxI2Lw59vn@Cvt>C-gN)Zn@^sZ}ShO=pQr=F($k=VoZj&&|!x6POVbWmR{pb^CXH zKOdeI*}Oc?yuN$^jQkV*C8Y&?xda(n5;OAzX3dE0Zn?3^$x&a|Qe0yZ56i?wTC$uB z3=E8n0t^hCj7$tbO2$!GmZ7z%D6x`}k#piN9Zk6aVR?r3{LH+P)FOe_#T#PG*Uc1N zpRhDYIcNQ0g%Dvypk#JxUTV=~7e+Tmxyjv((xx&3sXJz_+q<~oxxH7JhT!ws>uhq2 z49r3*G7Jig3`{~Y3`&d)j0y}wKvIT51xU&<$V|S?C@06y&aTJMnw40V2yz#XzMg@z Rp}sCVw;qVgIa!=Z836vBM@0Yt diff --git a/src/main/java/com/calebfontenot/Common.java b/src/main/java/com/calebfontenot/Common.java index 57dcde8..fda64ec 100644 --- a/src/main/java/com/calebfontenot/Common.java +++ b/src/main/java/com/calebfontenot/Common.java @@ -9,11 +9,8 @@ import java.util.ArrayList; import java.util.List; public class Common { - public static List parse(String fetchURL, String keyToFetch) throws Exception { - //System.out.println("CURLing API..."); - URL url = new URL(fetchURL); - try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"))) { - for (String line; (line = reader.readLine()) != null; ) { + public static List parseKey(String fetchURL, String keyToFetch) throws Exception { + String line = rawFetch(fetchURL); JSONObject json = new JSONObject(line); //System.out.println(line); JSONArray key = json.getJSONArray(keyToFetch); @@ -25,12 +22,6 @@ public class Common { return returnList; } - } catch (Exception IllegalArgumentException) { - return null; - } - return null; - } - public static String rawFetch(String fetchURL) throws Exception { //System.out.println("CURLing API..."); URL url = new URL(fetchURL); @@ -48,4 +39,15 @@ public class Common { } return null; } + public static String regex(String fetchURL) throws Exception{ // Regexes off the start and end square braces returned by certain APIs? + String raw = rawFetch(fetchURL); + raw = raw.substring(1, raw.length() - 1); + return raw; + } + public static String parse(String fetchURL, String keyToFetch) throws Exception{ + String raw = regex(fetchURL); + JSONTokener tokener = new JSONTokener(raw); + JSONObject object = new JSONObject(tokener); + return object.getString(keyToFetch); + } } diff --git a/src/main/java/com/calebfontenot/Main.java b/src/main/java/com/calebfontenot/Main.java index e805ab8..e4cce2f 100644 --- a/src/main/java/com/calebfontenot/Main.java +++ b/src/main/java/com/calebfontenot/Main.java @@ -52,7 +52,7 @@ public class Main { userInput = input.nextInt(); if (userInput == 1) { // user has selected PaperMC System.out.println("Available Projects: "); - List projects = Common.parse(PAPER_API_URL + "/projects", "projects"); + List projects = Common.parseKey(PAPER_API_URL + "/projects", "projects"); int i = 1; for (String projectNames : projects) { System.out.println(i + ". " + projectNames); diff --git a/src/main/java/com/calebfontenot/parsers/Velocity.java b/src/main/java/com/calebfontenot/parsers/Velocity.java index 6ca7264..25da639 100644 --- a/src/main/java/com/calebfontenot/parsers/Velocity.java +++ b/src/main/java/com/calebfontenot/parsers/Velocity.java @@ -5,6 +5,6 @@ import com.calebfontenot.Common; public class Velocity { public static final String MODRINTH_API_URL = "https://api.modrinth.com/v2"; public static void fetchVersions(String modID) throws Exception { // Fetch information about mod versions from the API. - System.out.println(Common.rawFetch(MODRINTH_API_URL + "/project/" + modID + "/version")); + System.out.println(Common.parse(MODRINTH_API_URL + "/project/" + modID + "/version", "id")); } }