Sha256: eea465feecc87cfe477172221b91d8a606c2453db30ed29801b4331fec889610

Contents?: true

Size: 923 Bytes

Versions: 2

Compression:

Stored size: 923 Bytes

Contents

module Stream

  module Batch
      #
      # Follows many feeds in one single request
      #
      # @param [Array<Hash<:source, :target>>] follows the list of follows
      #
      # @return [nil]
      # 
      # @example
      # 
      # client.follow_many([['flat:4', 'user:1'], ['flat:4', 'user:2']])
      # 
      def follow_many(follows)
          self.make_signed_request(:post, '/follow_many/', {}, follows)
      end

      #
      # Adds an activity to many feeds in one single request
      #
      # @param [Hash] activity_data the activity do add
      # @param [Array<string>] feeds list of feeds (eg. 'user:1', 'flat:2')
      #
      # @return [nil]
      # 
      def add_to_many(activity_data, feeds)
          data = {
              :feeds => feeds,
              :activity => activity_data
          }
          self.make_signed_request(:post, '/feed/add_to_many/', {}, data)
      end
    end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stream-ruby-2.2.1 lib/stream/batch.rb
stream-ruby-2.2 lib/stream/batch.rb