Class: AstroInsight::Services::HoroscopeService

Inherits:
Object
  • Object
show all
Defined in:
lib/astroinsight/services/horoscope.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ HoroscopeService

Returns a new instance of HoroscopeService.



8
9
10
# File 'lib/astroinsight/services/horoscope.rb', line 8

def initialize(client)
  @client = client
end

Instance Method Details

#get_daily_horoscope(sun_sign) ⇒ Object



12
13
14
# File 'lib/astroinsight/services/horoscope.rb', line 12

def get_daily_horoscope(sun_sign)
  @client.post("/horoscope/daily/#{CGI.escape(sun_sign.downcase)}")
end

#get_detailed_daily_horoscope(sun_sign) ⇒ Object



16
17
18
# File 'lib/astroinsight/services/horoscope.rb', line 16

def get_detailed_daily_horoscope(sun_sign)
  @client.post("/horoscope/daily/#{CGI.escape(sun_sign.downcase)}/detailed")
end

#get_detailed_monthly_horoscope(sun_sign) ⇒ Object



32
33
34
# File 'lib/astroinsight/services/horoscope.rb', line 32

def get_detailed_monthly_horoscope(sun_sign)
  @client.post("/horoscope/monthly/#{CGI.escape(sun_sign.downcase)}/detailed")
end

#get_monthly_horoscope(sun_sign) ⇒ Object



28
29
30
# File 'lib/astroinsight/services/horoscope.rb', line 28

def get_monthly_horoscope(sun_sign)
  @client.post("/horoscope/monthly/#{CGI.escape(sun_sign.downcase)}")
end

#get_tomorrow_daily_horoscope(sun_sign) ⇒ Object



20
21
22
# File 'lib/astroinsight/services/horoscope.rb', line 20

def get_tomorrow_daily_horoscope(sun_sign)
  @client.post("/horoscope/daily/#{CGI.escape(sun_sign.downcase)}/tomorrow")
end

#get_yesterday_daily_horoscope(sun_sign) ⇒ Object



24
25
26
# File 'lib/astroinsight/services/horoscope.rb', line 24

def get_yesterday_daily_horoscope(sun_sign)
  @client.post("/horoscope/daily/#{CGI.escape(sun_sign.downcase)}/yesterday")
end