Skip to content

Commit

Permalink
api key
Browse files Browse the repository at this point in the history
  • Loading branch information
ozzi- authored Apr 8, 2019
1 parent bf3cb39 commit a41854b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helpers/Subscriptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public static ArrayList<Subscription> 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: ");
Expand All @@ -35,6 +37,7 @@ public static ArrayList<Subscription> loadSubscriptions() {
subscription.setCVSS(subscriptionJSON.getAsJsonObject().get("cvss").getAsDouble());
System.out.print(subscription.getName()+", ");
}
subscription.setApiKey(apiKey);
subscriptions.add(subscription);
}
System.out.println();
Expand Down

0 comments on commit a41854b

Please sign in to comment.