astroapi-ruby 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/lib/astroapi/categories/analysis.rb +219 -0
  3. data/lib/astroapi/categories/astrocartography.rb +119 -0
  4. data/lib/astroapi/categories/base_category.rb +30 -0
  5. data/lib/astroapi/categories/charts.rb +119 -0
  6. data/lib/astroapi/categories/chinese.rb +72 -0
  7. data/lib/astroapi/categories/data.rb +100 -0
  8. data/lib/astroapi/categories/eclipses.rb +40 -0
  9. data/lib/astroapi/categories/enhanced.rb +53 -0
  10. data/lib/astroapi/categories/fengshui.rb +44 -0
  11. data/lib/astroapi/categories/fixed_stars.rb +47 -0
  12. data/lib/astroapi/categories/glossary.rb +114 -0
  13. data/lib/astroapi/categories/horary.rb +58 -0
  14. data/lib/astroapi/categories/horoscope.rb +144 -0
  15. data/lib/astroapi/categories/human_design.rb +77 -0
  16. data/lib/astroapi/categories/insights/business.rb +62 -0
  17. data/lib/astroapi/categories/insights/financial.rb +62 -0
  18. data/lib/astroapi/categories/insights/pet.rb +53 -0
  19. data/lib/astroapi/categories/insights/relationship.rb +67 -0
  20. data/lib/astroapi/categories/insights/wellness.rb +67 -0
  21. data/lib/astroapi/categories/insights.rb +41 -0
  22. data/lib/astroapi/categories/kabbalah.rb +69 -0
  23. data/lib/astroapi/categories/lunar.rb +51 -0
  24. data/lib/astroapi/categories/numerology.rb +37 -0
  25. data/lib/astroapi/categories/palmistry.rb +44 -0
  26. data/lib/astroapi/categories/pdf.rb +47 -0
  27. data/lib/astroapi/categories/render.rb +47 -0
  28. data/lib/astroapi/categories/svg.rb +48 -0
  29. data/lib/astroapi/categories/tarot.rb +156 -0
  30. data/lib/astroapi/categories/traditional.rb +93 -0
  31. data/lib/astroapi/categories/vedic.rb +190 -0
  32. data/lib/astroapi/categories/ziwei.rb +25 -0
  33. data/lib/astroapi/client.rb +103 -0
  34. data/lib/astroapi/configuration.rb +44 -0
  35. data/lib/astroapi/error.rb +74 -0
  36. data/lib/astroapi/http/client.rb +108 -0
  37. data/lib/astroapi/http/middleware/authentication.rb +22 -0
  38. data/lib/astroapi/http/middleware/logger.rb +43 -0
  39. data/lib/astroapi/http/middleware/response_unwrapper.rb +25 -0
  40. data/lib/astroapi/validators/base_validator.rb +72 -0
  41. data/lib/astroapi/validators/subject_validator.rb +87 -0
  42. data/lib/astroapi/version.rb +5 -0
  43. data/lib/astroapi.rb +18 -0
  44. metadata +218 -0
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_category'
4
+ require_relative '../validators/subject_validator'
5
+
6
+ module Astroapi
7
+ module Categories
8
+ # Eclipses category client for eclipse data and analysis
9
+ class Eclipses < BaseCategory
10
+ # Get upcoming eclipses
11
+ # @param params [Hash] Query parameters for filtering
12
+ # @return [Hash] Upcoming eclipses list
13
+ def get_upcoming(params = {})
14
+ http.get(build_url('upcoming'), params: params)
15
+ end
16
+
17
+ # Check natal impact
18
+ # @param request [Hash] Subject birth data and eclipse
19
+ # @return [Hash] Eclipse impact on chart
20
+ def check_natal_impact(request)
21
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
22
+ http.post(build_url('natal-check'), body: request)
23
+ end
24
+
25
+ # Get eclipse interpretation
26
+ # @param request [Hash] Subject and eclipse data
27
+ # @return [Hash] Eclipse interpretation
28
+ def get_interpretation(request)
29
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
30
+ http.post(build_url('interpretation'), body: request)
31
+ end
32
+
33
+ protected
34
+
35
+ def api_prefix
36
+ '/api/v3/eclipses'
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_category'
4
+ require_relative '../validators/subject_validator'
5
+
6
+ module Astroapi
7
+ module Categories
8
+ # Enhanced category client for enhanced analysis with chart data
9
+ class Enhanced < BaseCategory
10
+ # Get global analysis
11
+ # @param request [Hash] Date, time, location
12
+ # @return [Hash] Analysis without birth chart
13
+ def get_global_analysis(request)
14
+ http.post(build_url('global-analysis'), body: request)
15
+ end
16
+
17
+ # Get personal analysis
18
+ # @param request [Hash] Subject birth data
19
+ # @return [Hash] Birth chart analysis
20
+ def get_personal_analysis(request)
21
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
22
+ http.post(build_url('personal-analysis'), body: request)
23
+ end
24
+
25
+ # Get global analysis with chart
26
+ # @param request [Hash] Date, time, location
27
+ # @return [Hash] Analysis with chart rendering data
28
+ def get_global_analysis_chart(request)
29
+ http.post(build_custom_url('/api/v3/enhanced_charts', 'global-analysis'), body: request)
30
+ end
31
+
32
+ # Get personal analysis with chart
33
+ # @param request [Hash] Subject birth data
34
+ # @return [Hash] Analysis with chart rendering data
35
+ def get_personal_analysis_chart(request)
36
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
37
+ http.post(build_custom_url('/api/v3/enhanced_charts', 'personal-analysis'), body: request)
38
+ end
39
+
40
+ protected
41
+
42
+ def api_prefix
43
+ '/api/v3/enhanced'
44
+ end
45
+
46
+ # Build URL with custom prefix (for enhanced_charts endpoints)
47
+ def build_custom_url(prefix, *segments)
48
+ path_segments = [prefix, *segments.compact].map { |s| s.to_s.gsub(%r{^/+|/+$}, '') }
49
+ "/#{path_segments.join('/')}"
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_category'
4
+
5
+ module Astroapi
6
+ module Categories
7
+ # Feng Shui category client
8
+ class Fengshui < BaseCategory
9
+ # Calculate Flying Stars chart
10
+ # @param request [Hash] Building data
11
+ # @return [Hash] Flying Stars chart
12
+ def calculate_flying_stars_chart(request)
13
+ http.post(build_url('flying-stars', 'chart'), body: request)
14
+ end
15
+
16
+ # Get annual Flying Stars
17
+ # @param year [Integer] Year
18
+ # @return [Hash] Annual Flying Stars positions
19
+ def get_annual_flying_stars(year)
20
+ http.get(build_url('flying-stars', 'annual', year))
21
+ end
22
+
23
+ # Get annual afflictions
24
+ # @param year [Integer] Year
25
+ # @return [Hash] Annual afflictions
26
+ def get_afflictions(year)
27
+ http.get(build_url('afflictions', year))
28
+ end
29
+
30
+ # Get Flying Stars glossary
31
+ # @param params [Hash] Query parameters
32
+ # @return [Hash] Stars reference
33
+ def get_stars_glossary(params = {})
34
+ http.get(build_url('glossary', 'stars'), params: params)
35
+ end
36
+
37
+ protected
38
+
39
+ def api_prefix
40
+ '/api/v3/fengshui'
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_category'
4
+ require_relative '../validators/subject_validator'
5
+
6
+ module Astroapi
7
+ module Categories
8
+ # Fixed stars astrology category client
9
+ class FixedStars < BaseCategory
10
+ # Get fixed star positions
11
+ # @param request [Hash] Date and time
12
+ # @return [Hash] Star positions
13
+ def get_positions(request)
14
+ http.post(build_url('positions'), body: request)
15
+ end
16
+
17
+ # Get conjunctions
18
+ # @param request [Hash] Subject birth data
19
+ # @return [Hash] Stars conjunct natal planets
20
+ def get_conjunctions(request)
21
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
22
+ http.post(build_url('conjunctions'), body: request)
23
+ end
24
+
25
+ # Generate report
26
+ # @param request [Hash] Subject birth data
27
+ # @return [Hash] Fixed stars interpretation
28
+ def generate_report(request)
29
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
30
+ http.post(build_url('report'), body: request)
31
+ end
32
+
33
+ # Get presets
34
+ # @param params [Hash] Query parameters
35
+ # @return [Hash] Royal Stars, Behenian, etc.
36
+ def get_presets(params = {})
37
+ http.get(build_url('presets'), params: params)
38
+ end
39
+
40
+ protected
41
+
42
+ def api_prefix
43
+ '/api/v3/fixed-stars'
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,114 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_category'
4
+
5
+ module Astroapi
6
+ module Categories
7
+ # Glossary category client for reference data and lookups
8
+ class Glossary < BaseCategory
9
+ # Get all active points
10
+ # @param params [Hash] Query parameters
11
+ # @return [Hash] All astrological points
12
+ def get_active_points(params = {})
13
+ http.get(build_url('active-points'), params: params)
14
+ end
15
+
16
+ # Get primary active points
17
+ # @param params [Hash] Query parameters
18
+ # @return [Hash] Main planets
19
+ def get_primary_active_points(params = {})
20
+ http.get(build_url('active-points', 'primary'), params: params)
21
+ end
22
+
23
+ # Get cities
24
+ # @param params [Hash] Query parameters for search
25
+ # @return [Hash] City search results (paginated)
26
+ def get_cities(params = {})
27
+ http.get(build_url('cities'), params: params)
28
+ end
29
+
30
+ # Get countries
31
+ # @param params [Hash] Query parameters
32
+ # @return [Hash] ISO country codes
33
+ def get_countries(params = {})
34
+ http.get(build_url('countries'), params: params)
35
+ end
36
+
37
+ # Get elements
38
+ # @param params [Hash] Query parameters
39
+ # @return [Hash] Fire, Earth, Air, Water
40
+ def get_elements(params = {})
41
+ http.get(build_url('elements'), params: params)
42
+ end
43
+
44
+ # Get fixed stars
45
+ # @param params [Hash] Query parameters
46
+ # @return [Hash] Fixed star catalog
47
+ def get_fixed_stars(params = {})
48
+ http.get(build_url('fixed-stars'), params: params)
49
+ end
50
+
51
+ # Get house systems
52
+ # @param params [Hash] Query parameters
53
+ # @return [Hash] Placidus, Whole Sign, etc.
54
+ def get_house_systems(params = {})
55
+ http.get(build_url('house-systems'), params: params)
56
+ end
57
+
58
+ # Get houses
59
+ # @param params [Hash] Query parameters
60
+ # @return [Hash] House meanings
61
+ def get_houses(params = {})
62
+ http.get(build_url('houses'), params: params)
63
+ end
64
+
65
+ # Get keywords
66
+ # @param params [Hash] Query parameters
67
+ # @return [Hash] Astrological keywords
68
+ def get_keywords(params = {})
69
+ http.get(build_url('keywords'), params: params)
70
+ end
71
+
72
+ # Get supported languages
73
+ # @param params [Hash] Query parameters
74
+ # @return [Hash] Supported languages
75
+ def get_languages(params = {})
76
+ http.get(build_url('languages'), params: params)
77
+ end
78
+
79
+ # Get life areas
80
+ # @param params [Hash] Query parameters
81
+ # @return [Hash] Life area descriptions
82
+ def get_life_areas(params = {})
83
+ http.get(build_url('life-areas'), params: params)
84
+ end
85
+
86
+ # Get themes
87
+ # @param params [Hash] Query parameters
88
+ # @return [Hash] Chart styling themes
89
+ def get_themes(params = {})
90
+ http.get(build_url('themes'), params: params)
91
+ end
92
+
93
+ # Get zodiac types
94
+ # @param params [Hash] Query parameters
95
+ # @return [Hash] Tropical, Sidereal
96
+ def get_zodiac_types(params = {})
97
+ http.get(build_url('zodiac-types'), params: params)
98
+ end
99
+
100
+ # Get horary categories
101
+ # @param params [Hash] Query parameters
102
+ # @return [Hash] Horary question categories
103
+ def get_horary_categories(params = {})
104
+ http.get(build_url('horary-categories'), params: params)
105
+ end
106
+
107
+ protected
108
+
109
+ def api_prefix
110
+ '/api/v3/glossary'
111
+ end
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_category'
4
+
5
+ module Astroapi
6
+ module Categories
7
+ # Horary astrology category client
8
+ class Horary < BaseCategory
9
+ # Generate horary chart
10
+ # @param request [Hash] Question time and location
11
+ # @return [Hash] Horary chart data
12
+ def generate_chart(request)
13
+ http.post(build_url('chart'), body: request)
14
+ end
15
+
16
+ # Analyze horary question
17
+ # @param request [Hash] Chart data and question
18
+ # @return [Hash] Horary analysis
19
+ def analyze(request)
20
+ http.post(build_url('analyze'), body: request)
21
+ end
22
+
23
+ # Get horary aspects
24
+ # @param request [Hash] Chart data
25
+ # @return [Hash] Horary-specific aspects
26
+ def get_aspects(request)
27
+ http.post(build_url('aspects'), body: request)
28
+ end
29
+
30
+ # Analyze fertility question
31
+ # @param request [Hash] Chart data
32
+ # @return [Hash] Fertility analysis
33
+ def analyze_fertility(request)
34
+ http.post(build_url('fertility-analysis'), body: request)
35
+ end
36
+
37
+ # Get categories glossary
38
+ # @param params [Hash] Query parameters
39
+ # @return [Hash] Horary categories reference
40
+ def get_categories_glossary(params = {})
41
+ http.get(build_url('glossary', 'categories'), params: params)
42
+ end
43
+
44
+ # Get considerations glossary
45
+ # @param params [Hash] Query parameters
46
+ # @return [Hash] Considerations before judgment
47
+ def get_considerations_glossary(params = {})
48
+ http.get(build_url('glossary', 'considerations'), params: params)
49
+ end
50
+
51
+ protected
52
+
53
+ def api_prefix
54
+ '/api/v3/horary'
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,144 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_category'
4
+ require_relative '../validators/subject_validator'
5
+
6
+ module Astroapi
7
+ module Categories
8
+ # Horoscope category client for daily/weekly/monthly horoscopes
9
+ class Horoscope < BaseCategory
10
+ # Get personalized daily horoscope
11
+ # @param request [Hash] Subject birth data
12
+ # @return [Hash] Personalized daily horoscope
13
+ def get_personal_daily_horoscope(request)
14
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
15
+ http.post(build_url('personal', 'daily'), body: request)
16
+ end
17
+
18
+ # Get personalized daily horoscope text
19
+ # @param request [Hash] Subject birth data
20
+ # @return [Hash] Formatted horoscope text
21
+ def get_personal_daily_horoscope_text(request)
22
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
23
+ http.post(build_url('personal', 'daily', 'text'), body: request)
24
+ end
25
+
26
+ # Get sign daily horoscope
27
+ # @param request [Hash] Sun sign and date
28
+ # @return [Hash] Daily horoscope by sun sign
29
+ def get_sign_daily_horoscope(request)
30
+ http.post(build_url('sign', 'daily'), body: request)
31
+ end
32
+
33
+ # Get sign daily horoscope text
34
+ # @param request [Hash] Sun sign and date
35
+ # @return [Hash] Formatted daily text
36
+ def get_sign_daily_horoscope_text(request)
37
+ http.post(build_url('sign', 'daily', 'text'), body: request)
38
+ end
39
+
40
+ # Get sign weekly horoscope
41
+ # @param request [Hash] Sun sign and week
42
+ # @return [Hash] Weekly horoscope by sun sign
43
+ def get_sign_weekly_horoscope(request)
44
+ http.post(build_url('sign', 'weekly'), body: request)
45
+ end
46
+
47
+ # Get sign weekly horoscope text
48
+ # @param request [Hash] Sun sign and week
49
+ # @return [Hash] Formatted weekly text
50
+ def get_sign_weekly_horoscope_text(request)
51
+ http.post(build_url('sign', 'weekly', 'text'), body: request)
52
+ end
53
+
54
+ # Get sign monthly horoscope
55
+ # @param request [Hash] Sun sign and month
56
+ # @return [Hash] Monthly horoscope by sun sign
57
+ def get_sign_monthly_horoscope(request)
58
+ http.post(build_url('sign', 'monthly'), body: request)
59
+ end
60
+
61
+ # Get sign monthly horoscope text
62
+ # @param request [Hash] Sun sign and month
63
+ # @return [Hash] Formatted monthly text
64
+ def get_sign_monthly_horoscope_text(request)
65
+ http.post(build_url('sign', 'monthly', 'text'), body: request)
66
+ end
67
+
68
+ # Get sign yearly horoscope
69
+ # @param request [Hash] Sun sign and year
70
+ # @return [Hash] Yearly overview by sun sign
71
+ def get_sign_yearly_horoscope(request)
72
+ http.post(build_url('sign', 'yearly'), body: request)
73
+ end
74
+
75
+ # Get sign yearly horoscope text
76
+ # @param request [Hash] Sun sign and year
77
+ # @return [Hash] Formatted yearly text
78
+ def get_sign_yearly_horoscope_text(request)
79
+ http.post(build_url('sign', 'yearly', 'text'), body: request)
80
+ end
81
+
82
+ # Get personalized weekly horoscope
83
+ # @param request [Hash] Subject birth data
84
+ # @return [Hash] Personalized weekly horoscope
85
+ def get_personal_weekly_horoscope(request)
86
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
87
+ http.post(build_url('personal', 'weekly'), body: request)
88
+ end
89
+
90
+ # Get personalized weekly horoscope text
91
+ # @param request [Hash] Subject birth data
92
+ # @return [Hash] Formatted weekly horoscope text
93
+ def get_personal_weekly_horoscope_text(request)
94
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
95
+ http.post(build_url('personal', 'weekly', 'text'), body: request)
96
+ end
97
+
98
+ # Get personalized monthly horoscope
99
+ # @param request [Hash] Subject birth data
100
+ # @return [Hash] Personalized monthly horoscope
101
+ def get_personal_monthly_horoscope(request)
102
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
103
+ http.post(build_url('personal', 'monthly'), body: request)
104
+ end
105
+
106
+ # Get personalized monthly horoscope text
107
+ # @param request [Hash] Subject birth data
108
+ # @return [Hash] Formatted monthly horoscope text
109
+ def get_personal_monthly_horoscope_text(request)
110
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
111
+ http.post(build_url('personal', 'monthly', 'text'), body: request)
112
+ end
113
+
114
+ # Get personalized yearly horoscope
115
+ # @param request [Hash] Subject birth data
116
+ # @return [Hash] Personalized yearly horoscope
117
+ def get_personal_yearly_horoscope(request)
118
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
119
+ http.post(build_url('personal', 'yearly'), body: request)
120
+ end
121
+
122
+ # Get personalized yearly horoscope text
123
+ # @param request [Hash] Subject birth data
124
+ # @return [Hash] Formatted yearly horoscope text
125
+ def get_personal_yearly_horoscope_text(request)
126
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
127
+ http.post(build_url('personal', 'yearly', 'text'), body: request)
128
+ end
129
+
130
+ # Get Chinese horoscope
131
+ # @param request [Hash] Birth data for BaZi
132
+ # @return [Hash] Chinese horoscope
133
+ def get_chinese_horoscope(request)
134
+ http.post(build_url('chinese', 'bazi'), body: request)
135
+ end
136
+
137
+ protected
138
+
139
+ def api_prefix
140
+ '/api/v3/horoscope'
141
+ end
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_category'
4
+ require_relative '../validators/subject_validator'
5
+
6
+ module Astroapi
7
+ module Categories
8
+ # Human Design category client
9
+ class HumanDesign < BaseCategory
10
+ # Calculate bodygraph
11
+ # @param request [Hash] Subject birth data
12
+ # @return [Hash] Full bodygraph data
13
+ def calculate_bodygraph(request)
14
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
15
+ http.post(build_url('bodygraph'), body: request)
16
+ end
17
+
18
+ # Get type only
19
+ # @param request [Hash] Subject birth data
20
+ # @return [Hash] Human Design type
21
+ def get_type(request)
22
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
23
+ http.post(build_url('type'), body: request)
24
+ end
25
+
26
+ # Calculate design date
27
+ # @param request [Hash] Subject birth data
28
+ # @return [Hash] Design (88 degrees) date
29
+ def calculate_design_date(request)
30
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
31
+ http.post(build_url('design-date'), body: request)
32
+ end
33
+
34
+ # Calculate compatibility
35
+ # @param request [Hash] Two subjects' birth data
36
+ # @return [Hash] Human Design compatibility
37
+ def calculate_compatibility(request)
38
+ http.post(build_url('compatibility'), body: request)
39
+ end
40
+
41
+ # Calculate transit overlay
42
+ # @param request [Hash] Subject and transit date
43
+ # @return [Hash] Transit overlay on bodygraph
44
+ def calculate_transits(request)
45
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
46
+ http.post(build_url('transits'), body: request)
47
+ end
48
+
49
+ # Get channels glossary
50
+ # @param params [Hash] Query parameters
51
+ # @return [Hash] Channels reference
52
+ def get_channels_glossary(params = {})
53
+ http.get(build_url('glossary', 'channels'), params: params)
54
+ end
55
+
56
+ # Get gates glossary
57
+ # @param params [Hash] Query parameters
58
+ # @return [Hash] Gates reference
59
+ def get_gates_glossary(params = {})
60
+ http.get(build_url('glossary', 'gates'), params: params)
61
+ end
62
+
63
+ # Get types glossary
64
+ # @param params [Hash] Query parameters
65
+ # @return [Hash] Types reference
66
+ def get_types_glossary(params = {})
67
+ http.get(build_url('glossary', 'types'), params: params)
68
+ end
69
+
70
+ protected
71
+
72
+ def api_prefix
73
+ '/api/v3/human-design'
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../base_category'
4
+ require_relative '../../validators/subject_validator'
5
+
6
+ module Astroapi
7
+ module Categories
8
+ module Insights
9
+ # Business insights sub-client
10
+ class Business < BaseCategory
11
+ # Get team dynamics
12
+ # @param request [Hash] Multiple team members' birth data
13
+ # @return [Hash] Team dynamics analysis
14
+ def get_team_dynamics(request)
15
+ http.post(build_url('team-dynamics'), body: request)
16
+ end
17
+
18
+ # Get hiring compatibility
19
+ # @param request [Hash] Candidate and team/role data
20
+ # @return [Hash] Hiring compatibility analysis
21
+ def get_hiring_compatibility(request)
22
+ http.post(build_url('hiring-compatibility'), body: request)
23
+ end
24
+
25
+ # Get leadership style
26
+ # @param request [Hash] Subject birth data
27
+ # @return [Hash] Leadership style analysis
28
+ def get_leadership_style(request)
29
+ Validators::SubjectValidator.validate!(request[:subject] || request['subject'])
30
+ http.post(build_url('leadership-style'), body: request)
31
+ end
32
+
33
+ # Get business timing
34
+ # @param request [Hash] Business launch data and events
35
+ # @return [Hash] Business timing analysis
36
+ def get_business_timing(request)
37
+ http.post(build_url('business-timing'), body: request)
38
+ end
39
+
40
+ # Get department compatibility
41
+ # @param request [Hash] Department members' birth data
42
+ # @return [Hash] Department compatibility
43
+ def get_department_compatibility(request)
44
+ http.post(build_url('department-compatibility'), body: request)
45
+ end
46
+
47
+ # Get succession planning
48
+ # @param request [Hash] Current and potential leaders
49
+ # @return [Hash] Succession planning analysis
50
+ def get_succession_planning(request)
51
+ http.post(build_url('succession-planning'), body: request)
52
+ end
53
+
54
+ protected
55
+
56
+ def api_prefix
57
+ '/api/v3/insights/business'
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end