Class: PodcastIndex::Api::Episodes
- Inherits:
-
Object
- Object
- PodcastIndex::Api::Episodes
- Extended by:
- Request
- Defined in:
- lib/podcast_index/api/episodes.rb
Class Method Summary collapse
- .by_feed_id(id:, since: nil, max: nil, fulltext: nil) ⇒ Object
- .by_feed_url(url:, since: nil, max: nil, fulltext: nil) ⇒ Object
- .by_guid(guid:, feedurl: nil, feedid: nil, fulltext: nil) ⇒ Object
- .by_id(id:, fulltext: nil) ⇒ Object
- .by_itunes_id(id:, since: nil, max: nil, fulltext: nil) ⇒ Object
- .by_podcast_guid(podcast_guid:, since: nil, max: nil, fulltext: nil) ⇒ Object
- .live(max: nil) ⇒ Object
- .random(max: nil, lang: nil, cat: nil, notcat: nil, fulltext: nil) ⇒ Object
Methods included from Request
Class Method Details
.by_feed_id(id:, since: nil, max: nil, fulltext: nil) ⇒ Object
14 15 16 17 |
# File 'lib/podcast_index/api/episodes.rb', line 14 def by_feed_id(id:, since: nil, max: nil, fulltext: nil) response = get("/episodes/byfeedid", id: id, since: since, max: max, fulltext: fulltext) JSON.parse(response.body) end |
.by_feed_url(url:, since: nil, max: nil, fulltext: nil) ⇒ Object
20 21 22 23 |
# File 'lib/podcast_index/api/episodes.rb', line 20 def by_feed_url(url:, since: nil, max: nil, fulltext: nil) response = get("/episodes/byfeedurl", url: url, since: since, max: max, fulltext: fulltext) JSON.parse(response.body) end |
.by_guid(guid:, feedurl: nil, feedid: nil, fulltext: nil) ⇒ Object
32 33 34 35 |
# File 'lib/podcast_index/api/episodes.rb', line 32 def by_guid(guid:, feedurl: nil, feedid: nil, fulltext: nil) response = get("/episodes/byguid", guid: guid, feedurl: feedurl, feedid: feedid, fulltext: fulltext) JSON.parse(response.body) end |
.by_id(id:, fulltext: nil) ⇒ Object
8 9 10 11 |
# File 'lib/podcast_index/api/episodes.rb', line 8 def by_id(id:, fulltext: nil) response = get("/episodes/byid", id: id, fulltext: fulltext) JSON.parse(response.body) end |
.by_itunes_id(id:, since: nil, max: nil, fulltext: nil) ⇒ Object
38 39 40 41 |
# File 'lib/podcast_index/api/episodes.rb', line 38 def by_itunes_id(id:, since: nil, max: nil, fulltext: nil) response = get("/episodes/byitunesid", id: id, since: since, max: max, fulltext: fulltext) JSON.parse(response.body) end |
.by_podcast_guid(podcast_guid:, since: nil, max: nil, fulltext: nil) ⇒ Object
26 27 28 29 |
# File 'lib/podcast_index/api/episodes.rb', line 26 def by_podcast_guid(podcast_guid:, since: nil, max: nil, fulltext: nil) response = get("/episodes/bypodcastguid", guid: podcast_guid, since: since, max: max, fulltext: fulltext) JSON.parse(response.body) end |
.live(max: nil) ⇒ Object
44 45 46 47 |
# File 'lib/podcast_index/api/episodes.rb', line 44 def live(max: nil) response = get("/episodes/live", max: max) JSON.parse(response.body) end |
.random(max: nil, lang: nil, cat: nil, notcat: nil, fulltext: nil) ⇒ Object
50 51 52 53 |
# File 'lib/podcast_index/api/episodes.rb', line 50 def random(max: nil, lang: nil, cat: nil, notcat: nil, fulltext: nil) response = get("/episodes/random", max: max, lang: lang, cat: cat, notcat: notcat, fulltext: fulltext) JSON.parse(response.body) end |