Class: SnowNasa::Apod

Inherits:
Object
  • Object
show all
Includes:
SnowNasa
Defined in:
lib/SnowNasa/apod.rb

Constant Summary

Constants included from SnowNasa

VERSION

Instance Attribute Summary

Attributes included from SnowNasa

#nasa_api_key

Class Method Summary collapse

Methods included from SnowNasa

get_nasa_api_key, nasa_api_key

Class Method Details

.getAstroPicObject



5
6
7
8
9
# File 'lib/SnowNasa/apod.rb', line 5

def self.getAstroPic
  base_url = "https://api.nasa.gov/planetary/apod?api_key=#{@@nasa_api_key}"
  data = open(base_url).read
  JSON.parse(data)
end