Sha256: 0af105588576182c7c9a858fc911db5c409018af26eabf50ad57c1d8b2b3a816

Contents?: true

Size: 416 Bytes

Versions: 4

Compression:

Stored size: 416 Bytes

Contents

require 'net/http'
require 'uri'

module Helpers
  def getJson(url, type)
    uri = URI url
    return Net::HTTP.get uri
  end
  module_function :getJson

  def nasa_api_key
    ENV["NASA_API_KEY"]
  end
  module_function :nasa_api_key

  def vali_date(date)
    date.gsub! '/', '-'
  end
  module_function :vali_date

  def validate_iso8601(date)
    date.split('T')[0]
  end
  module_function :validate_iso8601
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bowshock-0.1.3 lib/bowshock/helpers.rb
bowshock-0.1.2 lib/bowshock/helpers.rb
bowshock-0.1.1 lib/bowshock/helpers.rb
bowshock-0.1.0 lib/bowshock/helpers.rb