Class: AstroInsight::Services::Vedic::MuhurtaService

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ MuhurtaService

Returns a new instance of MuhurtaService.



9
10
11
# File 'lib/astroinsight/services/vedic/muhurta.rb', line 9

def initialize(client)
  @client = client
end

Instance Method Details

#get_choghadiya(birth_details) ⇒ Object



13
14
15
16
# File 'lib/astroinsight/services/vedic/muhurta.rb', line 13

def get_choghadiya(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/muhurta/choghadiya", payload)
end

#get_gouri_choghadiya(birth_details) ⇒ Object



23
24
25
26
# File 'lib/astroinsight/services/vedic/muhurta.rb', line 23

def get_gouri_choghadiya(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/muhurta/gouri-choghadiya", payload)
end

#get_hora(birth_details) ⇒ Object



18
19
20
21
# File 'lib/astroinsight/services/vedic/muhurta.rb', line 18

def get_hora(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/muhurta/hora", payload)
end

#get_shubh_muhurta(topic_key, birth_details) ⇒ Object



28
29
30
31
# File 'lib/astroinsight/services/vedic/muhurta.rb', line 28

def get_shubh_muhurta(topic_key, birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/muhurta/shubh/#{CGI.escape(topic_key)}", payload)
end