Class: Jikanrb::Resources::AnimeResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Jikanrb::Resources::AnimeResource
- Defined in:
- lib/jikanrb/resources/anime_resource.rb
Overview
Resource class for accessing Anime sub-resources from the Jikan API. Provides fluent API access to anime details, characters, staff, episodes, news, forum topics, videos, pictures, statistics, and more.
Instance Attribute Summary
Attributes inherited from BaseResource
Instance Method Summary collapse
-
#characters ⇒ Hash
Returns characters and their voice actors for this anime.
-
#episodes(page: nil) ⇒ Hash
Returns episodes for this anime.
-
#external ⇒ Hash
Returns external links for this anime.
-
#forum ⇒ Hash
Returns forum topics related to this anime.
-
#info(full: false) ⇒ Hash
Returns anime details.
-
#news ⇒ Hash
Returns news articles related to this anime.
-
#pictures ⇒ Hash
Returns pictures of this anime.
-
#recommendations ⇒ Hash
Returns user recommendations for this anime.
-
#relations ⇒ Hash
Returns related anime/manga entries.
-
#staff ⇒ Hash
Returns staff members for this anime.
-
#statistics ⇒ Hash
Returns statistics for this anime.
-
#streaming ⇒ Hash
Returns streaming links for this anime.
-
#themes ⇒ Hash
Returns opening and ending themes for this anime.
-
#videos ⇒ Hash
Returns videos (PVs, episodes, music videos) for this anime.
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Jikanrb::Resources::BaseResource
Instance Method Details
#characters ⇒ Hash
Returns characters and their voice actors for this anime
44 45 46 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 44 def characters get("anime/#{@id}/characters") end |
#episodes(page: nil) ⇒ Hash
Returns episodes for this anime
70 71 72 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 70 def episodes(page: nil) get("anime/#{@id}/episodes", { page: page }.compact) end |
#external ⇒ Hash
Returns external links for this anime
169 170 171 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 169 def external get("anime/#{@id}/external") end |
#forum ⇒ Hash
Returns forum topics related to this anime
92 93 94 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 92 def forum get("anime/#{@id}/forum") end |
#info(full: false) ⇒ Hash
Returns anime details
32 33 34 35 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 32 def info(full: false) path = full ? "anime/#{@id}/full" : "anime/#{@id}" get(path) end |
#news ⇒ Hash
Returns news articles related to this anime
81 82 83 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 81 def news get("anime/#{@id}/news") end |
#pictures ⇒ Hash
Returns pictures of this anime
114 115 116 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 114 def pictures get("anime/#{@id}/pictures") end |
#recommendations ⇒ Hash
Returns user recommendations for this anime
136 137 138 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 136 def recommendations get("anime/#{@id}/recommendations") end |
#relations ⇒ Hash
Returns related anime/manga entries
147 148 149 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 147 def relations get("anime/#{@id}/relations") end |
#staff ⇒ Hash
Returns staff members for this anime
55 56 57 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 55 def staff get("anime/#{@id}/staff") end |
#statistics ⇒ Hash
Returns statistics for this anime
125 126 127 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 125 def statistics get("anime/#{@id}/statistics") end |
#streaming ⇒ Hash
Returns streaming links for this anime
180 181 182 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 180 def streaming get("anime/#{@id}/streaming") end |
#themes ⇒ Hash
Returns opening and ending themes for this anime
158 159 160 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 158 def themes get("anime/#{@id}/themes") end |
#videos ⇒ Hash
Returns videos (PVs, episodes, music videos) for this anime
103 104 105 |
# File 'lib/jikanrb/resources/anime_resource.rb', line 103 def videos get("anime/#{@id}/videos") end |