Sha256: 9de136cf4518393a9a8fdc8e0f699b56cf123aca16707c2ea70137f50107d401

Contents?: true

Size: 409 Bytes

Versions: 1

Compression:

Stored size: 409 Bytes

Contents

require 'typhoeus'
require 'uri'

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

1 entries across 1 versions & 1 rubygems

Version Path
prss-0.0.4 lib/prss/fetcher.rb