Class: ESV::ReadingPlan
- Inherits:
-
Object
- Object
- ESV::ReadingPlan
- Includes:
- HTTParty
- Defined in:
- lib/esv/reading_plan.rb
Instance Method Summary collapse
-
#info(options = {}) ⇒ Object
Parse and display information about the reading plan for a given date.
-
#initialize(default_options = {}) ⇒ ReadingPlan
constructor
The ESV API requires a key that can be passed in as one of the options, :key => ‘value’.
-
#query(options = {}) ⇒ Object
Retrieve passages from our Devotions section.
Constructor Details
#initialize(default_options = {}) ⇒ ReadingPlan
The ESV API requires a key that can be passed in as one of the options, :key => ‘value’. By default, it is ‘IP’
10 11 12 13 |
# File 'lib/esv/reading_plan.rb', line 10 def initialize(={}) @default_options = @default_options[:key] ||= 'IP' end |
Instance Method Details
#info(options = {}) ⇒ Object
Parse and display information about the reading plan for a given date
See www.esvapi.org/api for more information and options
25 26 27 |
# File 'lib/esv/reading_plan.rb', line 25 def info(={}) self.class.get '/readingPlanInfo', :query => @default_options.merge() end |
#query(options = {}) ⇒ Object
Retrieve passages from our Devotions section
See www.esvapi.org/api for more information and options
18 19 20 |
# File 'lib/esv/reading_plan.rb', line 18 def query(={}) self.class.get '/readingPlanQuery', :query => @default_options.merge() end |