Class: AstroInsight::Services::Vedic::AshtakvargaService
- Inherits:
-
Object
- Object
- AstroInsight::Services::Vedic::AshtakvargaService
- Defined in:
- lib/astroinsight/services/vedic/ashtakvarga.rb
Instance Method Summary collapse
- #get_planet_ashtak(ashtak_planet_key, birth_details) ⇒ Object
- #get_sarvashtakvarga(birth_details) ⇒ Object
-
#initialize(client) ⇒ AshtakvargaService
constructor
A new instance of AshtakvargaService.
Constructor Details
#initialize(client) ⇒ AshtakvargaService
Returns a new instance of AshtakvargaService.
9 10 11 |
# File 'lib/astroinsight/services/vedic/ashtakvarga.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#get_planet_ashtak(ashtak_planet_key, birth_details) ⇒ Object
13 14 15 16 |
# File 'lib/astroinsight/services/vedic/ashtakvarga.rb', line 13 def get_planet_ashtak(ashtak_planet_key, birth_details) payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details @client.post("/ashtakvarga/planetashtak/#{CGI.escape(ashtak_planet_key.downcase)}", payload) end |
#get_sarvashtakvarga(birth_details) ⇒ Object
18 19 20 21 |
# File 'lib/astroinsight/services/vedic/ashtakvarga.rb', line 18 def get_sarvashtakvarga(birth_details) payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details @client.post("/ashtakvarga/sarvashtak", payload) end |