lib/powertrack/streaming/stream.rb
def feature_url(hostname, feature=nil, sub_feature=nil)
      feature ||= @replay ? 'replay' : hostname
      sub_feature = sub_feature ? "/#{sub_feature}" : ''
      stream_type = (feature == 'rules' && @replay ? 'powertrack-replay' : 'powertrack')
      # replay streaming is on gnip.com while replay rules are on twitter.com...
      domain = (feature == 'replay' && @replay  ? 'gnip' : 'twitter')

      FEATURE_URL_FORMAT %
        [ hostname,
          domain,
          feature,
          stream_type,
          @account_name,
          @data_source,
          @label,
          sub_feature ]
    end
# Returns the URL of the stream for a given feature.
Returns the URL of the stream for a given feature.
Returns the URL of the stream for a given feature .
def feature_url(hostname, feature=nil, sub_feature=nil)
      feature ||= @replay ? 'replay' : hostname
      sub_feature = sub_feature ? "/#{sub_feature}" : ''
      stream_type = (feature == 'rules' && @replay ? 'powertrack-replay' : 'powertrack')
      domain = (feature == 'replay' && @replay  ? 'gnip' : 'twitter')
      FEATURE_URL_FORMAT %
        [ hostname,
          domain,
          feature,
          stream_type,
          @account_name,
          @data_source,
          @label,
          sub_feature ]
    end
def feature_url ( hostname , feature = nil , sub_feature = nil ) feature ||= @replay ? 'replay' : hostname sub_feature = sub_feature ? "/#{sub_feature}" : '' stream_type = ( feature == 'rules' && @replay ? 'powertrack-replay' : 'powertrack' ) domain = ( feature == 'replay' && @replay ? 'gnip' : 'twitter' ) FEATURE_URL_FORMAT % [ hostname , domain , feature , stream_type , @account_name , @data_source , @label , sub_feature ] end
Returns the URL of the stream for a given feature.
Returns the URL of the stream for a given feature .
# replay streaming is on gnip.com while replay rules are on twitter.com...
hostname
feature
sub_feature