Sha256: f925a44d75133f4a8f7efed6940564b12d2702d3bc44fb36698dc0de221bc1e2

Contents?: true

Size: 1.24 KB

Versions: 12

Compression:

Stored size: 1.24 KB

Contents

module Wework
  module Api
    module Methods
      module Batch
        def batch_syncuser media_id, callback_url=nil, token=nil, encodingaeskey=nil
          post 'batch/syncuser', batch_params(media_id, callback_url, token, encodingaeskey)
        end

        def batch_replaceuser media_id, callback_url=nil, token=nil, encodingaeskey=nil
          post 'batch/replaceuser', batch_params(media_id, callback_url, token, encodingaeskey)
        end

        def batch_replaceparty media_id, callback_url=nil, token=nil, encodingaeskey=nil
          post 'batch/replaceparty', batch_params(media_id, callback_url, token, encodingaeskey)
        end

        def batch_getresult job_id
          get 'batch/getresult', params: {jobid: job_id}
        end

        def batch_invite user=[], party=[], tag=[]
          post 'batch/invite', {user: user, party: party, tag: tag}
        end

        private

        def batch_params media_id, callback_url, token, encodingaeskey
          params = {media_id: media_id}
          if callback_url.present? && token.present? && encodingaeskey.present?
            params[:callback] = {url: callback_url, token: token, encodingaeskey: encodingaeskey}
          end

          params
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
wework-next-1.2.6 lib/wework/api/methods/batch.rb
wework-1.2.8 lib/wework/api/methods/batch.rb
wework-1.2.5 lib/wework/api/methods/batch.rb
wework-1.2.3 lib/wework/api/methods/batch.rb
wework-1.2.2 lib/wework/api/methods/batch.rb
wework-1.2.1 lib/wework/api/methods/batch.rb
wework-1.2.0 lib/wework/api/methods/batch.rb
wework-1.1.9 lib/wework/api/methods/batch.rb
wework-1.1.8 lib/wework/api/methods/batch.rb
wework-1.1.7 lib/wework/api/methods/batch.rb
wework-1.1.6 lib/wework/api/methods/batch.rb
wework-1.1.5 lib/wework/api/methods/batch.rb