Class: AstroInsight::Services::Vedic::BiorhythmService

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ BiorhythmService

Returns a new instance of BiorhythmService.



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

def initialize(client)
  @client = client
end

Instance Method Details

#get_biorhythm(birth_details) ⇒ Object



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

def get_biorhythm(birth_details)
  payload = birth_details.respond_to?(:to_h) ? birth_details.to_h : birth_details
  @client.post("/biorhythm", payload)
end