Module: Shikimori::API::V1::Videos
- Included in:
- Shikimori::API::V1
- Defined in:
- lib/shikimori/api/v1/videos.rb
Overview
Methods for the Videos API
Instance Method Summary collapse
-
#anime_videos(anime_id, headers: nil, **query) ⇒ Array<Hash>
Get anime videos.
-
#create_anime_video(anime_id, video, headers: nil, **query) ⇒ Hash
Create Video.
-
#delete_anime_video(anime_id:, video_id:, headers: nil, **query) ⇒ Boolean
Delete Video.
Instance Method Details
#anime_videos(anime_id, headers: nil, **query) ⇒ Array<Hash>
Get anime videos
26 27 28 |
# File 'lib/shikimori/api/v1/videos.rb', line 26 def anime_videos(anime_id, headers: nil, **query) rest.get base_url.join('animes', anime_id.to_s, 'videos').url, headers: headers, query: query end |
#create_anime_video(anime_id, video, headers: nil, **query) ⇒ Hash
Create Video
53 54 55 56 57 |
# File 'lib/shikimori/api/v1/videos.rb', line 53 def create_anime_video(anime_id, video, headers: nil, **query) rest.post base_url.join('animes', anime_id.to_s, 'videos').url, { video: video }, headers: headers, query: query end |
#delete_anime_video(anime_id:, video_id:, headers: nil, **query) ⇒ Boolean
Delete Video
77 78 79 80 81 |
# File 'lib/shikimori/api/v1/videos.rb', line 77 def delete_anime_video(anime_id:, video_id:, headers: nil, **query) rest.delete base_url.join('animes', anime_id.to_s, 'videos', video_id.to_s).url, headers: headers, query: query end |