Class: AstroInsight::Services::Vedic::VimshottariDashaService

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ VimshottariDashaService

Returns a new instance of VimshottariDashaService.



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

def initialize(client)
  @client = client
end

Instance Method Details

#get_antar_dasha(major_dasha_key, birth_details) ⇒ Object



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

def get_antar_dasha(major_dasha_key, birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/dasha/vimshottari/antar-dasha/#{CGI.escape(major_dasha_key)}", payload)
end

#get_current_dasha(birth_details) ⇒ Object



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

def get_current_dasha(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/dasha/vimshottari/current-dasha", payload)
end

#get_mahadasha_phal(planet_key, birth_details) ⇒ Object



33
34
35
36
# File 'lib/astroinsight/services/vedic/vimshottari_dasha.rb', line 33

def get_mahadasha_phal(planet_key, birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/dasha/vimshottari/mahadasha-phal/#{CGI.escape(planet_key)}", payload)
end

#get_major_dasha(birth_details) ⇒ Object



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

def get_major_dasha(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/dasha/vimshottari/major-dasha", payload)
end

#get_pratyantar_dasha(major_dasha_key, antar_dasha_key, birth_details) ⇒ Object



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

def get_pratyantar_dasha(major_dasha_key, antar_dasha_key, birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/dasha/vimshottari/pratyantar-dasha/#{CGI.escape(major_dasha_key)}/#{CGI.escape(antar_dasha_key)}", payload)
end