Class: Jikanrb::Resources::PersonResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Jikanrb::Resources::PersonResource
- Defined in:
- lib/jikanrb/resources/person_resource.rb
Overview
Resource class for accessing Person sub-resources from the Jikan API. Provides fluent API access to person details, anime staff positions, manga work, voice acting roles, and pictures.
Instance Attribute Summary
Attributes inherited from BaseResource
Instance Method Summary collapse
-
#animes ⇒ Hash
Returns anime staff positions for this person.
-
#info(full: false) ⇒ Hash
Returns person details.
-
#mangas ⇒ Hash
Returns manga work positions for this person.
-
#pictures ⇒ Hash
Returns pictures of this person.
-
#voices ⇒ Hash
Returns voice acting roles for this person.
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Jikanrb::Resources::BaseResource
Instance Method Details
#animes ⇒ Hash
Returns anime staff positions for this person
44 45 46 |
# File 'lib/jikanrb/resources/person_resource.rb', line 44 def animes get("people/#{@id}/anime") end |
#info(full: false) ⇒ Hash
Returns person details
32 33 34 35 |
# File 'lib/jikanrb/resources/person_resource.rb', line 32 def info(full: false) path = full ? "people/#{@id}/full" : "people/#{@id}" get(path) end |
#mangas ⇒ Hash
Returns manga work positions for this person
55 56 57 |
# File 'lib/jikanrb/resources/person_resource.rb', line 55 def mangas get("people/#{@id}/manga") end |
#pictures ⇒ Hash
Returns pictures of this person
77 78 79 |
# File 'lib/jikanrb/resources/person_resource.rb', line 77 def pictures get("people/#{@id}/pictures") end |
#voices ⇒ Hash
Returns voice acting roles for this person
66 67 68 |
# File 'lib/jikanrb/resources/person_resource.rb', line 66 def voices get("people/#{@id}/voices") end |