Class: AstroInsight::Services::Vedic::KPService

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KPService

Returns a new instance of KPService.



7
8
9
# File 'lib/astroinsight/services/vedic/kp.rb', line 7

def initialize(client)
  @client = client
end

Instance Method Details

#get_kp_houses(birth_details) ⇒ Object



21
22
23
24
# File 'lib/astroinsight/services/vedic/kp.rb', line 21

def get_kp_houses(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/kp/houses", payload)
end

#get_kp_planets(birth_details) ⇒ Object



16
17
18
19
# File 'lib/astroinsight/services/vedic/kp.rb', line 16

def get_kp_planets(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/kp/planets", payload)
end

#get_kp_system_details(birth_details) ⇒ Object



11
12
13
14
# File 'lib/astroinsight/services/vedic/kp.rb', line 11

def get_kp_system_details(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/kp/details", payload)
end