Class: AstroInsight::Services::Western::NatalAstrologyService

Inherits:
Object
  • Object
show all
Defined in:
lib/astroinsight/services/western/natal_astrology.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ NatalAstrologyService

Returns a new instance of NatalAstrologyService.



7
8
9
# File 'lib/astroinsight/services/western/natal_astrology.rb', line 7

def initialize(client)
  @client = client
end

Instance Method Details

#get_aspects(birth_details) ⇒ Object



16
17
18
19
# File 'lib/astroinsight/services/western/natal_astrology.rb', line 16

def get_aspects(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/western/natal-astrology/aspects", payload)
end

#get_house_cusps(birth_details) ⇒ Object



21
22
23
24
# File 'lib/astroinsight/services/western/natal_astrology.rb', line 21

def get_house_cusps(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/western/natal-astrology/chart", payload)
end

#get_planets(birth_details) ⇒ Object



11
12
13
14
# File 'lib/astroinsight/services/western/natal_astrology.rb', line 11

def get_planets(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/western/natal-astrology/planets", payload)
end

#get_synastry(match_input) ⇒ Object



26
27
28
29
# File 'lib/astroinsight/services/western/natal_astrology.rb', line 26

def get_synastry(match_input)
  payload = match_input.respond_to?(:to_h) ? match_input.to_h : match_input
  @client.post("/western/natal-astrology/synastry", payload)
end