Class: TencentCloud::Mgobe::V20201014::Client
- Inherits:
-
Common::AbstractClient
- Object
- Common::AbstractClient
- TencentCloud::Mgobe::V20201014::Client
- Defined in:
- lib/v20201014/client.rb
Instance Method Summary collapse
-
#ChangeRoomPlayerProfile(request) ⇒ Object
@rtype: :class:‘Tencentcloud::mgobe::V20201014::ChangeRoomPlayerProfileResponse`.
-
#ChangeRoomPlayerStatus(request) ⇒ Object
@rtype: :class:‘Tencentcloud::mgobe::V20201014::ChangeRoomPlayerStatusResponse`.
-
#DescribePlayer(request) ⇒ Object
@rtype: :class:‘Tencentcloud::mgobe::V20201014::DescribePlayerResponse`.
-
#DescribeRoom(request) ⇒ Object
@rtype: :class:‘Tencentcloud::mgobe::V20201014::DescribeRoomResponse`.
-
#DismissRoom(request) ⇒ Object
@rtype: :class:‘Tencentcloud::mgobe::V20201014::DismissRoomResponse`.
-
#initialize(credential, region, profile = nil) ⇒ Client
constructor
A new instance of Client.
-
#ModifyRoom(request) ⇒ Object
@rtype: :class:‘Tencentcloud::mgobe::V20201014::ModifyRoomResponse`.
-
#RemoveRoomPlayer(request) ⇒ Object
@rtype: :class:‘Tencentcloud::mgobe::V20201014::RemoveRoomPlayerResponse`.
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.('../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`
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'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , 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`
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'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , 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`
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'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , 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`
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'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , 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`
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'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , 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`
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'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , 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`
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'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |