Sha256: b60a85c0736e6e05d3410b95b541105407726f484204cd0d24670292e7b49ebb

Contents?: true

Size: 486 Bytes

Versions: 3

Compression:

Stored size: 486 Bytes

Contents

require 'stream/signer'
require 'stream/feed'

module Stream
    class Client

        def initialize(api_key, api_secret)
            @api_key = api_key
            @api_secret = api_secret
            @signer = Stream::Signer.new(api_secret)
        end

        def feed(feed_id)
            cleaned_feed_id = Stream::clean_feed_id(feed_id)
            signature = @signer.signature(cleaned_feed_id)
            Stream::Feed.new(feed_id, @api_key, signature)
        end

    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stream-ruby-0.2.1 lib/stream/client.rb
stream-ruby-0.2.0 lib/stream/client.rb
stream-ruby-0.1.0 lib/stream/client.rb