where_is_ISS 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/where_is_ISS/version.rb +1 -1
- data/lib/where_is_ISS.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52f06216af21c3e704dc1fa0372d5fd628d275170b4324b480e0f51bdbbdcf86
|
4
|
+
data.tar.gz: 84d252f6337e47ffe0b3ee1765969883c0b33618d6546ae64abf73c96544c1f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9ee61ca9726da70f603aa8ca3f4f7e1b8b9a7c969f0cf38eab87d5622c13973f514b4fa18ff5fde378af86c468fd7605bddbc018c3b305295f09bdbca5c224c
|
7
|
+
data.tar.gz: c17d278768afd796fd5af35fedfaf95f4afc750eb93742807fc08e9778d4b47ec3f760fe35d0391c92fc28aea12cf70dd2cb11663e0c889608c3b385528ce850
|
data/lib/where_is_ISS/version.rb
CHANGED
data/lib/where_is_ISS.rb
CHANGED
@@ -11,8 +11,8 @@ class Iss
|
|
11
11
|
@long = @data['longitude'] # getting longtitude from parsed response
|
12
12
|
response = Net::HTTP.get_response(URI.parse("https://api.wheretheiss.at/v1/coordinates/#{@lat},#{@long}")) # Checking for 200 OK response from Server
|
13
13
|
if (response.code).to_i == 200
|
14
|
-
iss = JSON[open("https://api.wheretheiss.at/v1/coordinates/#{@lat},#{@long}").read] # Print out data if status = 200 OK
|
15
|
-
puts iss['timezone_id'] # put out the location
|
14
|
+
@iss = JSON[open("https://api.wheretheiss.at/v1/coordinates/#{@lat},#{@long}").read] # Print out data if status = 200 OK
|
15
|
+
puts @iss['timezone_id'] # put out the location
|
16
16
|
else
|
17
17
|
puts("Currently ISS is over Water bodies(Coordinates works only on land)")
|
18
18
|
end
|