Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
almost done with weather stuff!
Browse files Browse the repository at this point in the history
  • Loading branch information
fulton committed Nov 10, 2019
1 parent 926d209 commit 9651f0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/andromeda/araserver/skills/GetInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,5 @@ private void getFast(String searchQuery) throws IOException {
}



}
6 changes: 4 additions & 2 deletions src/main/java/com/andromeda/araserver/skills/Weather.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.google.gson.JsonParser
import java.net.URL
import java.util.*


class Weather {
private var log: String? = null
private var lat: String? = null
Expand All @@ -25,10 +26,11 @@ class Weather {
val urlGridData = urlGrid.readText()
var json = JsonParser().parse(urlGridData)
val links = URL(json.asJsonObject.getAsJsonObject("properties").get("forecast").asString)
print(links)
val finalData = links.readText()
json = JsonParser().parse(finalData)
print(json)
val dataSet = json.asJsonObject.getAsJsonObject("properties").getAsJsonArray("periods")

print(dataSet[0].asJsonObject.get("temperature").asInt)
return "test"


Expand Down

0 comments on commit 9651f0d

Please sign in to comment.