astroinsightapi-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +153 -0
  4. data/lib/astroinsight/client.rb +46 -0
  5. data/lib/astroinsight/configuration.rb +28 -0
  6. data/lib/astroinsight/error.rb +28 -0
  7. data/lib/astroinsight/http_client.rb +82 -0
  8. data/lib/astroinsight/models/birth_details.rb +39 -0
  9. data/lib/astroinsight/models/geo_location.rb +27 -0
  10. data/lib/astroinsight/models/match_input.rb +46 -0
  11. data/lib/astroinsight/services/chinese_astrology.rb +35 -0
  12. data/lib/astroinsight/services/geo.rb +23 -0
  13. data/lib/astroinsight/services/horoscope.rb +37 -0
  14. data/lib/astroinsight/services/tarot.rb +51 -0
  15. data/lib/astroinsight/services/vedic/ashtakvarga.rb +25 -0
  16. data/lib/astroinsight/services/vedic/astro_details.rb +48 -0
  17. data/lib/astroinsight/services/vedic/biorhythm.rb +18 -0
  18. data/lib/astroinsight/services/vedic/char_dasha.rb +30 -0
  19. data/lib/astroinsight/services/vedic/horoscope_chart.rb +25 -0
  20. data/lib/astroinsight/services/vedic/horoscope_dosha.rb +33 -0
  21. data/lib/astroinsight/services/vedic/jaimini.rb +23 -0
  22. data/lib/astroinsight/services/vedic/kp.rb +28 -0
  23. data/lib/astroinsight/services/vedic/lal_kitab.rb +35 -0
  24. data/lib/astroinsight/services/vedic/life_report.rb +18 -0
  25. data/lib/astroinsight/services/vedic/match_making.rb +28 -0
  26. data/lib/astroinsight/services/vedic/muhurta.rb +35 -0
  27. data/lib/astroinsight/services/vedic/numerology.rb +18 -0
  28. data/lib/astroinsight/services/vedic/panchang.rb +28 -0
  29. data/lib/astroinsight/services/vedic/suggestions.rb +28 -0
  30. data/lib/astroinsight/services/vedic/varshaphal.rb +38 -0
  31. data/lib/astroinsight/services/vedic/vimshottari_dasha.rb +40 -0
  32. data/lib/astroinsight/services/vedic/yogini_dasha.rb +28 -0
  33. data/lib/astroinsight/services/vedic_container.rb +52 -0
  34. data/lib/astroinsight/services/western/natal_astrology.rb +33 -0
  35. data/lib/astroinsight/services/western/solar_return.rb +33 -0
  36. data/lib/astroinsight/services/western/transit.rb +43 -0
  37. data/lib/astroinsight/services/western/transit_chart.rb +23 -0
  38. data/lib/astroinsight/services/western/western_numerology.rb +38 -0
  39. data/lib/astroinsight/services/western/zodiac.rb +23 -0
  40. data/lib/astroinsight/services/western_container.rb +25 -0
  41. data/lib/astroinsight/version.rb +5 -0
  42. data/lib/astroinsight.rb +18 -0
  43. data/lib/astroinsightapi-sdk.rb +3 -0
  44. metadata +89 -0
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class AstroDetailsService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_birth_details(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/astro-details/birth-details", payload)
14
+ end
15
+
16
+ def get_basic_astro_details(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/astro-details/basic-astro-details", payload)
19
+ end
20
+
21
+ def get_astro_details(birth_details)
22
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
23
+ @client.post("/astro-details/astro-details", payload)
24
+ end
25
+
26
+ def get_planets(birth_details)
27
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
28
+ @client.post("/astro-details/planets", payload)
29
+ end
30
+
31
+ def get_planets_extended(birth_details)
32
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
33
+ @client.post("/astro-details/planets-extended", payload)
34
+ end
35
+
36
+ def get_ghat_chakra(birth_details)
37
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
38
+ @client.post("/astro-details/ghat-chakra", payload)
39
+ end
40
+
41
+ def get_planetary_friendship(birth_details)
42
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
43
+ @client.post("/astro-details/planetary-friendship", payload)
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class BiorhythmService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_biorhythm(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/biorhythm", payload)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cgi"
4
+
5
+ module AstroInsight
6
+ module Services
7
+ module Vedic
8
+ class CharDashaService
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ def get_major_dasha(birth_details)
14
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
15
+ @client.post("/dasha/char/major-dasha", payload)
16
+ end
17
+
18
+ def get_antar_dasha(rashi_key, birth_details)
19
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
20
+ @client.post("/dasha/char/antar-dasha/#{CGI.escape(rashi_key)}", payload)
21
+ end
22
+
23
+ def get_current_dasha(birth_details)
24
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
25
+ @client.post("/dasha/char/current-dasha", payload)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cgi"
4
+
5
+ module AstroInsight
6
+ module Services
7
+ module Vedic
8
+ class HoroscopeChartService
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ def get_chart(chart_id, birth_details)
14
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
15
+ @client.post("/horoscope/chart/#{CGI.escape(chart_id)}", payload)
16
+ end
17
+
18
+ def get_chart_image(chart_id, birth_details)
19
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
20
+ @client.post("/horoscope/chart/image/#{CGI.escape(chart_id)}", payload)
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class HoroscopeDoshaService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_manglik_dosha(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/horoscope/dosha/manglik", payload)
14
+ end
15
+
16
+ def get_kalsarp_dosha(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/horoscope/dosha/kalsarp", payload)
19
+ end
20
+
21
+ def get_pitra_dosha(birth_details)
22
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
23
+ @client.post("/horoscope/dosha/pitra", payload)
24
+ end
25
+
26
+ def get_sadesati_details(birth_details)
27
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
28
+ @client.post("/horoscope/dosha/sadesati", payload)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class JaiminiService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_jaimini_details(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/jaimini/details", payload)
14
+ end
15
+
16
+ def get_jaimini_karaka(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/jaimini/karaka", payload)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class KPService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_kp_system_details(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/kp/details", payload)
14
+ end
15
+
16
+ def get_kp_planets(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/kp/planets", payload)
19
+ end
20
+
21
+ def get_kp_houses(birth_details)
22
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
23
+ @client.post("/kp/houses", payload)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cgi"
4
+
5
+ module AstroInsight
6
+ module Services
7
+ module Vedic
8
+ class LalKitabService
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ def get_lal_kitab_debts(birth_details)
14
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
15
+ @client.post("/lalkitab/debts", payload)
16
+ end
17
+
18
+ def get_lal_kitab_planets(birth_details)
19
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
20
+ @client.post("/lalkitab/planets", payload)
21
+ end
22
+
23
+ def get_lal_kitab_houses(birth_details)
24
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
25
+ @client.post("/lalkitab/houses", payload)
26
+ end
27
+
28
+ def get_lal_kitab_remedies(planet_key, birth_details)
29
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
30
+ @client.post("/lalkitab/remedies/#{CGI.escape(planet_key)}", payload)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class LifeReportService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_life_report(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/life-report", payload)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class MatchMakingService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_guna_milan(match_input)
12
+ payload = match_input.respond_to?(:to_h) ? match_input.to_h : match_input
13
+ @client.post("/matchmaking/guna-milan", payload)
14
+ end
15
+
16
+ def get_match_making_report(match_input)
17
+ payload = match_input.respond_to?(:to_h) ? match_input.to_h : match_input
18
+ @client.post("/matchmaking/report", payload)
19
+ end
20
+
21
+ def get_manglik_match(match_input)
22
+ payload = match_input.respond_to?(:to_h) ? match_input.to_h : match_input
23
+ @client.post("/matchmaking/manglik-match", payload)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cgi"
4
+
5
+ module AstroInsight
6
+ module Services
7
+ module Vedic
8
+ class MuhurtaService
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ def get_choghadiya(birth_details)
14
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
15
+ @client.post("/muhurta/choghadiya", payload)
16
+ end
17
+
18
+ def get_hora(birth_details)
19
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
20
+ @client.post("/muhurta/hora", payload)
21
+ end
22
+
23
+ def get_gouri_choghadiya(birth_details)
24
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
25
+ @client.post("/muhurta/gouri-choghadiya", payload)
26
+ end
27
+
28
+ def get_shubh_muhurta(topic_key, birth_details)
29
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
30
+ @client.post("/muhurta/shubh/#{CGI.escape(topic_key)}", payload)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class NumerologyService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_vedic_numerology(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/numerology/vedic", payload)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class PanchangService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_daily_panchang(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/panchang/daily", payload)
14
+ end
15
+
16
+ def get_advanced_panchang(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/panchang/advanced", payload)
19
+ end
20
+
21
+ def get_planet_panchang(birth_details)
22
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
23
+ @client.post("/panchang/planet", payload)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class SuggestionsService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_gemstone_suggestions(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/suggestions/gemstone", payload)
14
+ end
15
+
16
+ def get_rudraksha_suggestions(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/suggestions/rudraksha", payload)
19
+ end
20
+
21
+ def get_jadi_suggestions(birth_details)
22
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
23
+ @client.post("/suggestions/jadi", payload)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class VarshaphalService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_varshaphal_planets(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/varshaphal/planets", payload)
14
+ end
15
+
16
+ def get_varshaphal_chart(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/varshaphal/chart", payload)
19
+ end
20
+
21
+ def get_varshaphal_details(birth_details)
22
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
23
+ @client.post("/varshaphal/details", payload)
24
+ end
25
+
26
+ def get_varshaphal_muntha(birth_details)
27
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
28
+ @client.post("/varshaphal/muntha", payload)
29
+ end
30
+
31
+ def get_varshaphal_bala(birth_details)
32
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
33
+ @client.post("/varshaphal/panchavargeeya-bala", payload)
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cgi"
4
+
5
+ module AstroInsight
6
+ module Services
7
+ module Vedic
8
+ class VimshottariDashaService
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ def get_major_dasha(birth_details)
14
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
15
+ @client.post("/dasha/vimshottari/major-dasha", payload)
16
+ end
17
+
18
+ def get_antar_dasha(major_dasha_key, birth_details)
19
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
20
+ @client.post("/dasha/vimshottari/antar-dasha/#{CGI.escape(major_dasha_key)}", payload)
21
+ end
22
+
23
+ def get_pratyantar_dasha(major_dasha_key, antar_dasha_key, birth_details)
24
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
25
+ @client.post("/dasha/vimshottari/pratyantar-dasha/#{CGI.escape(major_dasha_key)}/#{CGI.escape(antar_dasha_key)}", payload)
26
+ end
27
+
28
+ def get_current_dasha(birth_details)
29
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
30
+ @client.post("/dasha/vimshottari/current-dasha", payload)
31
+ end
32
+
33
+ def get_mahadasha_phal(planet_key, birth_details)
34
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
35
+ @client.post("/dasha/vimshottari/mahadasha-phal/#{CGI.escape(planet_key)}", payload)
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Vedic
6
+ class YoginiDashaService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_major_dasha(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/dasha/yogini/major-dasha", payload)
14
+ end
15
+
16
+ def get_antar_dasha(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/dasha/yogini/antar-dasha", payload)
19
+ end
20
+
21
+ def get_current_dasha(birth_details)
22
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
23
+ @client.post("/dasha/yogini/current-dasha", payload)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "vedic/ashtakvarga"
4
+ require_relative "vedic/astro_details"
5
+ require_relative "vedic/biorhythm"
6
+ require_relative "vedic/char_dasha"
7
+ require_relative "vedic/horoscope_chart"
8
+ require_relative "vedic/horoscope_dosha"
9
+ require_relative "vedic/jaimini"
10
+ require_relative "vedic/kp"
11
+ require_relative "vedic/lal_kitab"
12
+ require_relative "vedic/life_report"
13
+ require_relative "vedic/match_making"
14
+ require_relative "vedic/muhurta"
15
+ require_relative "vedic/numerology"
16
+ require_relative "vedic/panchang"
17
+ require_relative "vedic/suggestions"
18
+ require_relative "vedic/varshaphal"
19
+ require_relative "vedic/vimshottari_dasha"
20
+ require_relative "vedic/yogini_dasha"
21
+
22
+ module AstroInsight
23
+ module Services
24
+ class VedicContainer
25
+ attr_reader :ashtakvarga, :astro_details, :biorhythm, :char_dasha, :horoscope_chart,
26
+ :horoscope_dosha, :jaimini, :kp, :lal_kitab, :life_report, :match_making,
27
+ :muhurta, :numerology, :panchang, :suggestions, :varshaphal,
28
+ :vimshottari_dasha, :yogini_dasha
29
+
30
+ def initialize(client)
31
+ @ashtakvarga = Vedic::AshtakvargaService.new(client)
32
+ @astro_details = Vedic::AstroDetailsService.new(client)
33
+ @biorhythm = Vedic::BiorhythmService.new(client)
34
+ @char_dasha = Vedic::CharDashaService.new(client)
35
+ @horoscope_chart = Vedic::HoroscopeChartService.new(client)
36
+ @horoscope_dosha = Vedic::HoroscopeDoshaService.new(client)
37
+ @jaimini = Vedic::JaiminiService.new(client)
38
+ @kp = Vedic::KPService.new(client)
39
+ @lal_kitab = Vedic::LalKitabService.new(client)
40
+ @life_report = Vedic::LifeReportService.new(client)
41
+ @match_making = Vedic::MatchMakingService.new(client)
42
+ @muhurta = Vedic::MuhurtaService.new(client)
43
+ @numerology = Vedic::NumerologyService.new(client)
44
+ @panchang = Vedic::PanchangService.new(client)
45
+ @suggestions = Vedic::SuggestionsService.new(client)
46
+ @varshaphal = Vedic::VarshaphalService.new(client)
47
+ @vimshottari_dasha = Vedic::VimshottariDashaService.new(client)
48
+ @yogini_dasha = Vedic::YoginiDashaService.new(client)
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Western
6
+ class NatalAstrologyService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_planets(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/western/natal-astrology/planets", payload)
14
+ end
15
+
16
+ def get_aspects(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/western/natal-astrology/aspects", payload)
19
+ end
20
+
21
+ def get_house_cusps(birth_details)
22
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
23
+ @client.post("/western/natal-astrology/chart", payload)
24
+ end
25
+
26
+ def get_synastry(match_input)
27
+ payload = match_input.respond_to?(:to_h) ? match_input.to_h : match_input
28
+ @client.post("/western/natal-astrology/synastry", payload)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AstroInsight
4
+ module Services
5
+ module Western
6
+ class SolarReturnService
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ def get_details(birth_details)
12
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
13
+ @client.post("/western/solar-return/details", payload)
14
+ end
15
+
16
+ def get_planets(birth_details)
17
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
18
+ @client.post("/western/solar-return/planets", payload)
19
+ end
20
+
21
+ def get_house_cusps(birth_details)
22
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
23
+ @client.post("/western/solar-return/house-cusps", payload)
24
+ end
25
+
26
+ def get_planet_aspects(birth_details)
27
+ payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
28
+ @client.post("/western/solar-return/planet-aspects", payload)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end