Module: QcloudVod::Api::V1::TEvents

Included in:
QcloudVod
Defined in:
lib/qcloud_vod/api/v1/t_events.rb

Instance Method Summary collapse

Instance Method Details

#pull_eventsObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/qcloud_vod/api/v1/t_events.rb', line 6

def pull_events
  r_method = "GET"
  r_host = "vod.tencentcloudapi.com/"

  options = { Action: 'PullEvents' }
  options.merge!({ SignatureMethod: 'HmacSHA1'})
  options.merge!({ Region: ''})
  sign = authorization.get_value(r_method,r_host,options,Time.now.to_i+86400)

  options.merge!({ Signature: sign})

  res = http.get("https://vod.tencentcloudapi.com/?#{options.to_query}")
  ActiveSupport::HashWithIndifferentAccess.new(JSON.parse(res.body))

end