Class: NBS::Base
- Inherits:
-
Object
- Object
- NBS::Base
- Extended by:
- MemcachedMemoize
- Defined in:
- lib/next-big-sound/base.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_key) ⇒ Base
constructor
A new instance of Base.
-
#search(query, options = {}) ⇒ Object
return a search object that you can manipulate if you prefer to just use the xml simply type to_xml this method with actually fetch the result.
Methods included from MemcachedMemoize
Constructor Details
#initialize(api_key) ⇒ Base
Returns a new instance of Base.
9 10 11 12 |
# File 'lib/next-big-sound/base.rb', line 9 def initialize(api_key) $nbs_api_key = api_key #puts CACHE_ENABLED end |
Class Method Details
.t_to_d(string_timestamp) ⇒ Object
21 22 23 |
# File 'lib/next-big-sound/base.rb', line 21 def self.t_to_d() return Date.parse(Time.at(.to_i).to_s) end |
Instance Method Details
#search(query, options = {}) ⇒ Object
return a search object that you can manipulate if you prefer to just use the xml simply type to_xml this method with actually fetch the result
16 17 18 19 20 |
# File 'lib/next-big-sound/base.rb', line 16 def search(query, ={} ) search = NBS::Search.new(query,) search.fetch return search end |