Class: Zelda::Request
- Inherits:
-
Object
- Object
- Zelda::Request
- Defined in:
- lib/zelda/request.rb
Class Method Summary collapse
Class Method Details
.get(url) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/zelda/request.rb', line 3 def self.get(url) result = HTTParty.get parse_url(url) if result %w(created_at updated_at id).each do |key| result.delete(key) if result[key] end if result['error'] raise result['error'] end end result end |