Class: Astroapi::Client
- Inherits:
-
Object
- Object
- Astroapi::Client
- Defined in:
- lib/astroapi/client.rb
Overview
Main client for the Astrology API
Instance Attribute Summary collapse
-
#analysis ⇒ Object
readonly
Returns the value of attribute analysis.
-
#astrocartography ⇒ Object
readonly
Returns the value of attribute astrocartography.
-
#charts ⇒ Object
readonly
Returns the value of attribute charts.
-
#chinese ⇒ Object
readonly
Returns the value of attribute chinese.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#eclipses ⇒ Object
readonly
Returns the value of attribute eclipses.
-
#enhanced ⇒ Object
readonly
Returns the value of attribute enhanced.
-
#fengshui ⇒ Object
readonly
Returns the value of attribute fengshui.
-
#fixed_stars ⇒ Object
readonly
Returns the value of attribute fixed_stars.
-
#glossary ⇒ Object
readonly
Returns the value of attribute glossary.
-
#horary ⇒ Object
readonly
Returns the value of attribute horary.
-
#horoscope ⇒ Object
readonly
Returns the value of attribute horoscope.
-
#human_design ⇒ Object
readonly
Returns the value of attribute human_design.
-
#insights ⇒ Object
readonly
Returns the value of attribute insights.
-
#kabbalah ⇒ Object
readonly
Returns the value of attribute kabbalah.
-
#lunar ⇒ Object
readonly
Returns the value of attribute lunar.
-
#numerology ⇒ Object
readonly
Returns the value of attribute numerology.
-
#palmistry ⇒ Object
readonly
Returns the value of attribute palmistry.
-
#pdf ⇒ Object
readonly
Returns the value of attribute pdf.
-
#render ⇒ Object
readonly
Returns the value of attribute render.
-
#svg ⇒ Object
readonly
Returns the value of attribute svg.
-
#tarot ⇒ Object
readonly
Returns the value of attribute tarot.
-
#traditional ⇒ Object
readonly
Returns the value of attribute traditional.
-
#vedic ⇒ Object
readonly
Returns the value of attribute vedic.
-
#ziwei ⇒ Object
readonly
Returns the value of attribute ziwei.
Instance Method Summary collapse
-
#initialize(options = {}) {|config| ... } ⇒ Client
constructor
Initialize a new client.
Constructor Details
#initialize(options = {}) {|config| ... } ⇒ Client
Initialize a new client
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/astroapi/client.rb', line 63 def initialize( = {}) @config = Configuration.new if block_given? yield @config else .each do |key, value| @config.public_send(:"#{key}=", value) if @config.respond_to?(:"#{key}=") end end @http_client = HTTP::Client.new(@config) @data = Categories::Data.new(@http_client) @charts = Categories::Charts.new(@http_client) @horoscope = Categories::Horoscope.new(@http_client) @analysis = Categories::Analysis.new(@http_client) @glossary = Categories::Glossary.new(@http_client) @astrocartography = Categories::Astrocartography.new(@http_client) @chinese = Categories::Chinese.new(@http_client) @eclipses = Categories::Eclipses.new(@http_client) @lunar = Categories::Lunar.new(@http_client) @numerology = Categories::Numerology.new(@http_client) @tarot = Categories::Tarot.new(@http_client) @traditional = Categories::Traditional.new(@http_client) @fixed_stars = Categories::FixedStars.new(@http_client) @insights = Categories::InsightsCategory.new(@http_client) @svg = Categories::Svg.new(@http_client) @enhanced = Categories::Enhanced.new(@http_client) @vedic = Categories::Vedic.new(@http_client) @human_design = Categories::HumanDesign.new(@http_client) @kabbalah = Categories::Kabbalah.new(@http_client) @horary = Categories::Horary.new(@http_client) @fengshui = Categories::Fengshui.new(@http_client) @palmistry = Categories::Palmistry.new(@http_client) @pdf = Categories::Pdf.new(@http_client) @render = Categories::Render.new(@http_client) @ziwei = Categories::Ziwei.new(@http_client) end |
Instance Attribute Details
#analysis ⇒ Object (readonly)
Returns the value of attribute analysis.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def analysis @analysis end |
#astrocartography ⇒ Object (readonly)
Returns the value of attribute astrocartography.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def astrocartography @astrocartography end |
#charts ⇒ Object (readonly)
Returns the value of attribute charts.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def charts @charts end |
#chinese ⇒ Object (readonly)
Returns the value of attribute chinese.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def chinese @chinese end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def config @config end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def data @data end |
#eclipses ⇒ Object (readonly)
Returns the value of attribute eclipses.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def eclipses @eclipses end |
#enhanced ⇒ Object (readonly)
Returns the value of attribute enhanced.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def enhanced @enhanced end |
#fengshui ⇒ Object (readonly)
Returns the value of attribute fengshui.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def fengshui @fengshui end |
#fixed_stars ⇒ Object (readonly)
Returns the value of attribute fixed_stars.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def fixed_stars @fixed_stars end |
#glossary ⇒ Object (readonly)
Returns the value of attribute glossary.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def glossary @glossary end |
#horary ⇒ Object (readonly)
Returns the value of attribute horary.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def horary @horary end |
#horoscope ⇒ Object (readonly)
Returns the value of attribute horoscope.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def horoscope @horoscope end |
#human_design ⇒ Object (readonly)
Returns the value of attribute human_design.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def human_design @human_design end |
#insights ⇒ Object (readonly)
Returns the value of attribute insights.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def insights @insights end |
#kabbalah ⇒ Object (readonly)
Returns the value of attribute kabbalah.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def kabbalah @kabbalah end |
#lunar ⇒ Object (readonly)
Returns the value of attribute lunar.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def lunar @lunar end |
#numerology ⇒ Object (readonly)
Returns the value of attribute numerology.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def numerology @numerology end |
#palmistry ⇒ Object (readonly)
Returns the value of attribute palmistry.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def palmistry @palmistry end |
#pdf ⇒ Object (readonly)
Returns the value of attribute pdf.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def pdf @pdf end |
#render ⇒ Object (readonly)
Returns the value of attribute render.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def render @render end |
#svg ⇒ Object (readonly)
Returns the value of attribute svg.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def svg @svg end |
#tarot ⇒ Object (readonly)
Returns the value of attribute tarot.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def tarot @tarot end |
#traditional ⇒ Object (readonly)
Returns the value of attribute traditional.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def traditional @traditional end |
#vedic ⇒ Object (readonly)
Returns the value of attribute vedic.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def vedic @vedic end |
#ziwei ⇒ Object (readonly)
Returns the value of attribute ziwei.
48 49 50 |
# File 'lib/astroapi/client.rb', line 48 def ziwei @ziwei end |