Class: Organo::Query
- Inherits:
-
Object
- Object
- Organo::Query
- Defined in:
- lib/organo/query.rb
Class Method Summary collapse
- .get_anime_by_id(mal_id) ⇒ Object
- .get_anime_image(mal_id) ⇒ Object
- .get_anime_season(season, year) ⇒ Object
- .get_anime_sequel(mal_id) ⇒ Object
- .search_anime(query, options) ⇒ Object
Class Method Details
.get_anime_by_id(mal_id) ⇒ Object
8 9 10 |
# File 'lib/organo/query.rb', line 8 def self.get_anime_by_id(mal_id) Request.get_json("#{JikanAPI.get_url('anime')}/#{mal_id}") end |
.get_anime_image(mal_id) ⇒ Object
21 22 23 |
# File 'lib/organo/query.rb', line 21 def self.get_anime_image(mal_id) Request.get_json("#{JikanAPI.get_url('anime')}/#{mal_id}")['images']['jpg']['image_url'] end |
.get_anime_season(season, year) ⇒ Object
17 18 19 |
# File 'lib/organo/query.rb', line 17 def self.get_anime_season(season, year) Request.get_json("#{JikanAPI.get_url('seasons')}/#{year}/#{season.downcase}") end |