Class: ScrapeGot::API
- Inherits:
-
Object
- Object
- ScrapeGot::API
- Defined in:
- lib/scrape_got/api.rb
Class Method Summary collapse
Class Method Details
.get_books ⇒ Object
7 8 9 10 11 |
# File 'lib/scrape_got/api.rb', line 7 def self.get_books response = HTTParty.get("https://www.anapioficeandfire.com/api/books?page=1&pageSize=20") body = response.body @data = JSON.parse(body) end |
.get_houses ⇒ Object
13 14 15 16 17 |
# File 'lib/scrape_got/api.rb', line 13 def self.get_houses response = HTTParty.get("https://www.anapioficeandfire.com/api/houses?page=1&pageSize=20") body = response.body @data = JSON.parse(body) end |