Class: Wave::Podcast
- Inherits:
-
Object
- Object
- Wave::Podcast
- Defined in:
- lib/wave/podcast.rb
Overview
Podcast — Podcast show and episode management
Instance Method Summary collapse
-
#create_episode(show_id, body) ⇒ Object
Create an episode (operationId: createPodcastEpisode, POST /podcast/shows/showId/episodes).
-
#create_show(body) ⇒ Object
Create a podcast show (operationId: createPodcastShow, POST /podcast/shows).
-
#initialize(client) ⇒ Podcast
constructor
A new instance of Podcast.
-
#list_episodes(show_id, page: nil, per_page: nil) ⇒ Object
List episodes for a show (operationId: listPodcastEpisodes, GET /podcast/shows/showId/episodes).
-
#list_shows(page: nil, per_page: nil) ⇒ Object
List podcast shows (operationId: listPodcastShows, GET /podcast/shows).
Constructor Details
#initialize(client) ⇒ Podcast
Returns a new instance of Podcast.
6 7 8 |
# File 'lib/wave/podcast.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#create_episode(show_id, body) ⇒ Object
Create an episode (operationId: createPodcastEpisode, POST /podcast/shows/showId/episodes).
34 35 36 |
# File 'lib/wave/podcast.rb', line 34 def create_episode(show_id, body) @client.request("POST", "/podcast/shows/#{show_id}/episodes", body: body) end |
#create_show(body) ⇒ Object
Create a podcast show (operationId: createPodcastShow, POST /podcast/shows).
20 21 22 |
# File 'lib/wave/podcast.rb', line 20 def create_show(body) @client.request("POST", "/podcast/shows", body: body) end |
#list_episodes(show_id, page: nil, per_page: nil) ⇒ Object
List episodes for a show (operationId: listPodcastEpisodes, GET /podcast/shows/showId/episodes).
25 26 27 28 29 30 31 |
# File 'lib/wave/podcast.rb', line 25 def list_episodes(show_id, page: nil, per_page: nil) query = { "page" => page, "perPage" => per_page, } @client.request("GET", "/podcast/shows/#{show_id}/episodes", query: query) end |
#list_shows(page: nil, per_page: nil) ⇒ Object
List podcast shows (operationId: listPodcastShows, GET /podcast/shows).
11 12 13 14 15 16 17 |
# File 'lib/wave/podcast.rb', line 11 def list_shows(page: nil, per_page: nil) query = { "page" => page, "perPage" => per_page, } @client.request("GET", "/podcast/shows", query: query) end |