Class: TencentCloud::Mgobe::V20201014::Client

Inherits:
Common::AbstractClient
  • Object
show all
Defined in:
lib/v20201014/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(credential, region, profile = nil) ⇒ Client

Returns a new instance of Client.



24
25
26
27
28
29
# File 'lib/v20201014/client.rb', line 24

def initialize(credential, region, profile = nil)
    api_version = '2020-10-14'
    api_endpoint = 'mgobe.tencentcloudapi.com'
    sdk_version = 'MGOBE_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end

Instance Method Details

#ChangeRoomPlayerProfile(request) ⇒ Object

@rtype: :class:‘Tencentcloud::mgobe::V20201014::ChangeRoomPlayerProfileResponse`

Parameters:

  • request:

    Request instance for ChangeRoomPlayerProfile.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/v20201014/client.rb', line 39

def ChangeRoomPlayerProfile(request)
  body = send_request('ChangeRoomPlayerProfile', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ChangeRoomPlayerProfileResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ChangeRoomPlayerStatus(request) ⇒ Object

@rtype: :class:‘Tencentcloud::mgobe::V20201014::ChangeRoomPlayerStatusResponse`

Parameters:

  • request:

    Request instance for ChangeRoomPlayerStatus.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/v20201014/client.rb', line 65

def ChangeRoomPlayerStatus(request)
  body = send_request('ChangeRoomPlayerStatus', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ChangeRoomPlayerStatusResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribePlayer(request) ⇒ Object

@rtype: :class:‘Tencentcloud::mgobe::V20201014::DescribePlayerResponse`

Parameters:

  • request:

    Request instance for DescribePlayer.



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/v20201014/client.rb', line 91

def DescribePlayer(request)
  body = send_request('DescribePlayer', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribePlayerResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeRoom(request) ⇒ Object

@rtype: :class:‘Tencentcloud::mgobe::V20201014::DescribeRoomResponse`

Parameters:

  • request:

    Request instance for DescribeRoom.



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/v20201014/client.rb', line 117

def DescribeRoom(request)
  body = send_request('DescribeRoom', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeRoomResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DismissRoom(request) ⇒ Object

@rtype: :class:‘Tencentcloud::mgobe::V20201014::DismissRoomResponse`

Parameters:

  • request:

    Request instance for DismissRoom.



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/v20201014/client.rb', line 143

def DismissRoom(request)
  body = send_request('DismissRoom', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DismissRoomResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ModifyRoom(request) ⇒ Object

@rtype: :class:‘Tencentcloud::mgobe::V20201014::ModifyRoomResponse`

Parameters:

  • request:

    Request instance for ModifyRoom.



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/v20201014/client.rb', line 169

def ModifyRoom(request)
  body = send_request('ModifyRoom', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyRoomResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#RemoveRoomPlayer(request) ⇒ Object

@rtype: :class:‘Tencentcloud::mgobe::V20201014::RemoveRoomPlayerResponse`

Parameters:

  • request:

    Request instance for RemoveRoomPlayer.



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/v20201014/client.rb', line 195

def RemoveRoomPlayer(request)
  body = send_request('RemoveRoomPlayer', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = RemoveRoomPlayerResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end