Sha256: 7f303a0f2df3f5bbefeda42f69d67dcbdbb79a2dcd1aa03c4dab9ec42bfb1716

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

module PodcastIndex
  module Api
    class Recent
      extend Request

      class << self
        def episodes(max: nil, exclude_string: nil, before: nil, fulltext: nil)
          response = get("/recent/episodes", max: max, exclude_string: exclude_string, before: before,
                                             fulltext: fulltext)
          JSON.parse(response.body)
        end

        def feeds(max: nil, since: nil, lang: nil, cat: nil, notcat: nil)
          response = get("/recent/feeds", max: max, since: since, lang: lang, cat: cat, notcat: notcat)
          JSON.parse(response.body)
        end

        def new_feeds(max: nil, since: nil, feedid: nil, desc: nil)
          response = get("/recent/newfeeds", max: max, since: since, feedid: feedid, desc: desc)
          JSON.parse(response.body)
        end

        def data(max: nil, since: nil)
          response = get("/recent/data", max: max, since: since)
          JSON.parse(response.body)
        end

        def soundbites(max: nil)
          response = get("/recent/soundbites", max: max)
          JSON.parse(response.body)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
podcast_index-0.5.0 lib/podcast_index/api/recent.rb
podcast_index-0.4.0 lib/podcast_index/api/recent.rb
podcast_index-0.3.0 lib/podcast_index/api/recent.rb
podcast_index-0.2.1 lib/podcast_index/api/recent.rb
podcast_index-0.2.0 lib/podcast_index/api/recent.rb