lib/podcast_index/api/podcasts.rb in podcast_index-0.1.0 vs lib/podcast_index/api/podcasts.rb in podcast_index-0.2.0

- old
+ new

@@ -21,9 +21,30 @@ def by_guid(guid:) response = get("/podcasts/byguid", guid: guid) JSON.parse(response.body) end + + def by_tag(tag:) + params = {}.tap { |p| p[tag] = true } + response = get("/podcasts/bytag", params) + JSON.parse(response.body) + end + + def by_medium(medium:) + response = get("/podcasts/bymedium", medium: medium) + JSON.parse(response.body) + end + + def trending(max: nil, since: nil, lang: nil, cat: nil, notcat: nil) + response = get("/podcasts/trending", max: max, since: since, lang: lang, cat: cat, notcat: notcat) + JSON.parse(response.body) + end + + def dead + response = get("/podcasts/dead", {}) + JSON.parse(response.body) + end end end end end