diff --git a/helpers/Subscriptions.java b/helpers/Subscriptions.java index b921968..96f0035 100644 --- a/helpers/Subscriptions.java +++ b/helpers/Subscriptions.java @@ -20,6 +20,8 @@ public static ArrayList loadSubscriptions() { String subscriptionsString = Convert.convertStreamToString(stream2); stream2.close(); JsonElement jsonSubscriptions = new JsonParser().parse(subscriptionsString); + String apiKey = jsonSubscriptions.getAsJsonObject().get("apikey").getAsString(); + JsonElement subscriptionElement = jsonSubscriptions.getAsJsonObject().get("entries"); JsonArray subscriptionArray = subscriptionElement.getAsJsonArray(); System.out.print("Subscribed to: "); @@ -35,6 +37,7 @@ public static ArrayList loadSubscriptions() { subscription.setCVSS(subscriptionJSON.getAsJsonObject().get("cvss").getAsDouble()); System.out.print(subscription.getName()+", "); } + subscription.setApiKey(apiKey); subscriptions.add(subscription); } System.out.println();