Class: AstroInsight::Services::Vedic::PanchangService
- Inherits:
-
Object
- Object
- AstroInsight::Services::Vedic::PanchangService
- Defined in:
- lib/astroinsight/services/vedic/panchang.rb
Instance Method Summary collapse
- #get_advanced_panchang(birth_details) ⇒ Object
- #get_daily_panchang(birth_details) ⇒ Object
- #get_planet_panchang(birth_details) ⇒ Object
-
#initialize(client) ⇒ PanchangService
constructor
A new instance of PanchangService.
Constructor Details
#initialize(client) ⇒ PanchangService
Returns a new instance of PanchangService.
7 8 9 |
# File 'lib/astroinsight/services/vedic/panchang.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#get_advanced_panchang(birth_details) ⇒ Object
16 17 18 19 |
# File 'lib/astroinsight/services/vedic/panchang.rb', line 16 def get_advanced_panchang(birth_details) payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details @client.post("/panchang/advanced", payload) end |
#get_daily_panchang(birth_details) ⇒ Object
11 12 13 14 |
# File 'lib/astroinsight/services/vedic/panchang.rb', line 11 def get_daily_panchang(birth_details) payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details @client.post("/panchang/daily", payload) end |
#get_planet_panchang(birth_details) ⇒ Object
21 22 23 24 |
# File 'lib/astroinsight/services/vedic/panchang.rb', line 21 def get_planet_panchang(birth_details) payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details @client.post("/panchang/planet", payload) end |