Class: Lce::Quote
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- Lce::Quote
- Includes:
- Hashie::Extensions::Coercion
- Defined in:
- lib/lce/quote.rb
Class Method Summary collapse
Class Method Details
.all(page = nil) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/lce/quote.rb', line 16 def all(page = nil) if page page = 1 if page <= 0 = {page: page} end response = Lce.client.get('quotes', nil, nil, nil , ) response.map! do |q| new(q) end end |
.find(id) ⇒ Object
27 28 29 30 |
# File 'lib/lce/quote.rb', line 27 def find(id) response = Lce.client.get('quotes', id) new(response) end |
.request(params) ⇒ Object
11 12 13 14 |
# File 'lib/lce/quote.rb', line 11 def request(params) response = Lce.client.post('quotes', {quote: params}) new(response) end |