Class: APIHub::Watchlist
- Defined in:
- lib/apihub/watchlist.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Entity, Individual
Class Method Summary collapse
Methods inherited from Resource
delete, endpoint, get, options, path, post, put, request, uri, url
Methods inherited from Mash
#custom_reader, #custom_writer, #deep_merge, #deep_update, #delete, #dup, #fetch, #id, #initialize, #initializing_reader, #key?, #method_missing, new, #regular_dup, #replace, #respond_to?, #shallow_merge, #shallow_update, #type, #underbang_reader
Constructor Details
This class inherits a constructor from APIHub::Mash
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class APIHub::Mash
Class Method Details
.search(name, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/apihub/watchlist.rb', line 6 def self.search(name, = {}) = .dup params = .delete(:params) || {} params = { name: name, threshold: .delete(:threshold) || 1.0 }.merge(params) response = post('', params, ) self.new(response) end |