Sha256: b242fd22a80631997cef0622fa6b561e04cc54eb46ca8c30d841f670160f1b5e

Contents?: true

Size: 395 Bytes

Versions: 2

Compression:

Stored size: 395 Bytes

Contents

require 'typhoeus'

module PRSS
  class Fetcher
    PERSONAL_FEED_URL = "https://hdbits.org/rss/my"

    attr_reader :uri

    def initialize(passkey)
      #@passkey = passkey
      @uri = URI(PERSONAL_FEED_URL)
      @uri.query = "passkey=#{passkey}"
    end

    def response
      @response ||= Typhoeus::Request.get(@uri.to_s)
    end

    def output
      response.body
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prss-0.0.3 lib/prss/fetcher.rb
prss-0.0.2 lib/prss/fetcher.rb