v20201014

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "2020-10-14"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeRoomPlayerProfileRequest

type ChangeRoomPlayerProfileRequest struct {
	*tchttp.BaseRequest

	// 游戏资源Id。
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 发起修改的玩家Id。
	PlayerId *string `json:"PlayerId,omitempty" name:"PlayerId"`

	// 需要修改的玩家自定义属性。
	CustomProfile *string `json:"CustomProfile,omitempty" name:"CustomProfile"`
}

func NewChangeRoomPlayerProfileRequest

func NewChangeRoomPlayerProfileRequest() (request *ChangeRoomPlayerProfileRequest)

func (*ChangeRoomPlayerProfileRequest) FromJsonString

func (r *ChangeRoomPlayerProfileRequest) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*ChangeRoomPlayerProfileRequest) ToJsonString

func (r *ChangeRoomPlayerProfileRequest) ToJsonString() string

type ChangeRoomPlayerProfileResponse

type ChangeRoomPlayerProfileResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 房间信息。
		Room *Room `json:"Room,omitempty" name:"Room"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewChangeRoomPlayerProfileResponse

func NewChangeRoomPlayerProfileResponse() (response *ChangeRoomPlayerProfileResponse)

func (*ChangeRoomPlayerProfileResponse) FromJsonString

func (r *ChangeRoomPlayerProfileResponse) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*ChangeRoomPlayerProfileResponse) ToJsonString

func (r *ChangeRoomPlayerProfileResponse) ToJsonString() string

type ChangeRoomPlayerStatusRequest

type ChangeRoomPlayerStatusRequest struct {
	*tchttp.BaseRequest

	// 游戏资源Id。
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 玩家自定义状态。
	CustomStatus *uint64 `json:"CustomStatus,omitempty" name:"CustomStatus"`

	// 玩家id。
	PlayerId *string `json:"PlayerId,omitempty" name:"PlayerId"`
}

func NewChangeRoomPlayerStatusRequest

func NewChangeRoomPlayerStatusRequest() (request *ChangeRoomPlayerStatusRequest)

func (*ChangeRoomPlayerStatusRequest) FromJsonString

func (r *ChangeRoomPlayerStatusRequest) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*ChangeRoomPlayerStatusRequest) ToJsonString

func (r *ChangeRoomPlayerStatusRequest) ToJsonString() string

type ChangeRoomPlayerStatusResponse

type ChangeRoomPlayerStatusResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 房间信息
		Room *Room `json:"Room,omitempty" name:"Room"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewChangeRoomPlayerStatusResponse

func NewChangeRoomPlayerStatusResponse() (response *ChangeRoomPlayerStatusResponse)

func (*ChangeRoomPlayerStatusResponse) FromJsonString

func (r *ChangeRoomPlayerStatusResponse) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*ChangeRoomPlayerStatusResponse) ToJsonString

func (r *ChangeRoomPlayerStatusResponse) ToJsonString() string

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) ChangeRoomPlayerProfile

func (c *Client) ChangeRoomPlayerProfile(request *ChangeRoomPlayerProfileRequest) (response *ChangeRoomPlayerProfileResponse, err error)

修改房间玩家自定义属性

func (*Client) ChangeRoomPlayerStatus

func (c *Client) ChangeRoomPlayerStatus(request *ChangeRoomPlayerStatusRequest) (response *ChangeRoomPlayerStatusResponse, err error)

修改玩家自定义状态

func (*Client) DescribePlayer

func (c *Client) DescribePlayer(request *DescribePlayerRequest) (response *DescribePlayerResponse, err error)

该接口用于查询玩家信息。支持两种用法,当OpenId不传的时候,PlayerId必传,传入PlayerId可以查询当前PlayerId的玩家信息,当OpenId传入的时候,PlayerId可不传,按照OpenId查询玩家信息。

func (*Client) DescribeRoom

func (c *Client) DescribeRoom(request *DescribeRoomRequest) (response *DescribeRoomResponse, err error)

该接口用于查询房间信息。支持两种用法,当房间Id不传的时候,玩家Id必传,传入玩家Id可以查询当前玩家所在的房间信息,当房间Id传入的时候,玩家Id可不传,按照房间Id查询房间信息。

func (*Client) DismissRoom

func (c *Client) DismissRoom(request *DismissRoomRequest) (response *DismissRoomResponse, err error)

通过game_id、room_id解散房间

func (*Client) ModifyRoom

func (c *Client) ModifyRoom(request *ModifyRoomRequest) (response *ModifyRoomResponse, err error)

修改房间

func (*Client) RemoveRoomPlayer

func (c *Client) RemoveRoomPlayer(request *RemoveRoomPlayerRequest) (response *RemoveRoomPlayerResponse, err error)

踢出房间玩家

type DescribePlayerRequest

type DescribePlayerRequest struct {
	*tchttp.BaseRequest

	// 游戏资源Id。
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 玩家OpenId。
	OpenId *string `json:"OpenId,omitempty" name:"OpenId"`

	// 玩家PlayerId,由后台分配,当OpenId不传的时候,PlayerId必传,传入PlayerId可以查询当前PlayerId的玩家信息,当OpenId传入的时候,PlayerId可不传,按照OpenId查询玩家信息。
	PlayerId *string `json:"PlayerId,omitempty" name:"PlayerId"`
}

func NewDescribePlayerRequest

func NewDescribePlayerRequest() (request *DescribePlayerRequest)

func (*DescribePlayerRequest) FromJsonString

func (r *DescribePlayerRequest) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribePlayerRequest) ToJsonString

func (r *DescribePlayerRequest) ToJsonString() string

type DescribePlayerResponse

type DescribePlayerResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 玩家信息。
		Player *Player `json:"Player,omitempty" name:"Player"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribePlayerResponse

func NewDescribePlayerResponse() (response *DescribePlayerResponse)

func (*DescribePlayerResponse) FromJsonString

func (r *DescribePlayerResponse) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribePlayerResponse) ToJsonString

func (r *DescribePlayerResponse) ToJsonString() string

type DescribeRoomRequest

type DescribeRoomRequest struct {
	*tchttp.BaseRequest

	// 游戏资源Id。
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 玩家Id。当房间Id不传的时候,玩家Id必传,传入玩家Id可以查询当前玩家所在的房间信息,当房间Id传入的时候,优先按照房间Id查询房间信息。
	PlayerId *string `json:"PlayerId,omitempty" name:"PlayerId"`

	// 房间Id。
	RoomId *string `json:"RoomId,omitempty" name:"RoomId"`
}

func NewDescribeRoomRequest

func NewDescribeRoomRequest() (request *DescribeRoomRequest)

func (*DescribeRoomRequest) FromJsonString

func (r *DescribeRoomRequest) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeRoomRequest) ToJsonString

func (r *DescribeRoomRequest) ToJsonString() string

type DescribeRoomResponse

type DescribeRoomResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 房间信息。
		Room *Room `json:"Room,omitempty" name:"Room"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeRoomResponse

func NewDescribeRoomResponse() (response *DescribeRoomResponse)

func (*DescribeRoomResponse) FromJsonString

func (r *DescribeRoomResponse) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeRoomResponse) ToJsonString

func (r *DescribeRoomResponse) ToJsonString() string

type DismissRoomRequest

type DismissRoomRequest struct {
	*tchttp.BaseRequest

	// 表示游戏资源唯一 ID, 由后台自动分配, 无法修改。
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 表示游戏房间唯一ID。
	RoomId *string `json:"RoomId,omitempty" name:"RoomId"`
}

func NewDismissRoomRequest

func NewDismissRoomRequest() (request *DismissRoomRequest)

func (*DismissRoomRequest) FromJsonString

func (r *DismissRoomRequest) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DismissRoomRequest) ToJsonString

func (r *DismissRoomRequest) ToJsonString() string

type DismissRoomResponse

type DismissRoomResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDismissRoomResponse

func NewDismissRoomResponse() (response *DismissRoomResponse)

func (*DismissRoomResponse) FromJsonString

func (r *DismissRoomResponse) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DismissRoomResponse) ToJsonString

func (r *DismissRoomResponse) ToJsonString() string

type ModifyRoomRequest

type ModifyRoomRequest struct {
	*tchttp.BaseRequest

	// 游戏资源Id。
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 房间ID。
	RoomId *string `json:"RoomId,omitempty" name:"RoomId"`

	// 发起者的PlayerId。
	PlayerId *string `json:"PlayerId,omitempty" name:"PlayerId"`

	// 需要修改的房间选项,0表示房间名称,1表示房主,2表示是否允许观战,3表示是否支持邀请码/密码,4表示是否私有,5表示是否自定义房间属性,6表示是否禁止加人。
	ChangeRoomOptionList []*int64 `json:"ChangeRoomOptionList,omitempty" name:"ChangeRoomOptionList" list`

	// 房间名称。
	RoomName *string `json:"RoomName,omitempty" name:"RoomName"`

	// 变更房主。
	Owner *string `json:"Owner,omitempty" name:"Owner"`

	// 是否支持观战。
	IsViewed *bool `json:"IsViewed,omitempty" name:"IsViewed"`

	// 是否支持邀请码/密码。
	IsInvited *bool `json:"IsInvited,omitempty" name:"IsInvited"`

	// 是否私有。
	IsPrivate *bool `json:"IsPrivate,omitempty" name:"IsPrivate"`

	// 自定义房间属性。
	CustomProperties *string `json:"CustomProperties,omitempty" name:"CustomProperties"`

	// 房间是否禁止加人。
	IsForbidJoin *bool `json:"IsForbidJoin,omitempty" name:"IsForbidJoin"`
}

func NewModifyRoomRequest

func NewModifyRoomRequest() (request *ModifyRoomRequest)

func (*ModifyRoomRequest) FromJsonString

func (r *ModifyRoomRequest) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*ModifyRoomRequest) ToJsonString

func (r *ModifyRoomRequest) ToJsonString() string

type ModifyRoomResponse

type ModifyRoomResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 房间信息
		Room *Room `json:"Room,omitempty" name:"Room"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewModifyRoomResponse

func NewModifyRoomResponse() (response *ModifyRoomResponse)

func (*ModifyRoomResponse) FromJsonString

func (r *ModifyRoomResponse) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*ModifyRoomResponse) ToJsonString

func (r *ModifyRoomResponse) ToJsonString() string

type Player

type Player struct {

	// 玩家 OpenId。最长不超过64个字符。
	OpenId *string `json:"OpenId,omitempty" name:"OpenId"`

	// 玩家昵称。最长不超过32个字符。
	Name *string `json:"Name,omitempty" name:"Name"`

	// 队伍 ID。最长不超过16个字符。
	TeamId *string `json:"TeamId,omitempty" name:"TeamId"`

	// 是否为机器人。
	IsRobot *bool `json:"IsRobot,omitempty" name:"IsRobot"`

	// 玩家 PlayerId。出参使用,由后端返回。
	PlayerId *string `json:"PlayerId,omitempty" name:"PlayerId"`

	// 自定义玩家状态。非负数,最大不超过4294967295。默认为0。
	CustomPlayerStatus *uint64 `json:"CustomPlayerStatus,omitempty" name:"CustomPlayerStatus"`

	// 自定义玩家属性。最长不超过256个字符。默认为空字符串。
	CustomProfile *string `json:"CustomProfile,omitempty" name:"CustomProfile"`
}

type RemoveRoomPlayerRequest

type RemoveRoomPlayerRequest struct {
	*tchttp.BaseRequest

	// 游戏资源Id。
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 被踢出房间的玩家Id。
	RemovePlayerId *string `json:"RemovePlayerId,omitempty" name:"RemovePlayerId"`
}

func NewRemoveRoomPlayerRequest

func NewRemoveRoomPlayerRequest() (request *RemoveRoomPlayerRequest)

func (*RemoveRoomPlayerRequest) FromJsonString

func (r *RemoveRoomPlayerRequest) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*RemoveRoomPlayerRequest) ToJsonString

func (r *RemoveRoomPlayerRequest) ToJsonString() string

type RemoveRoomPlayerResponse

type RemoveRoomPlayerResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 房间信息
		Room *Room `json:"Room,omitempty" name:"Room"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewRemoveRoomPlayerResponse

func NewRemoveRoomPlayerResponse() (response *RemoveRoomPlayerResponse)

func (*RemoveRoomPlayerResponse) FromJsonString

func (r *RemoveRoomPlayerResponse) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*RemoveRoomPlayerResponse) ToJsonString

func (r *RemoveRoomPlayerResponse) ToJsonString() string

type Room

type Room struct {

	// 表示房间名称。最长不超过32个字符。
	Name *string `json:"Name,omitempty" name:"Name"`

	// 表示房间最大玩家数量。最大不超过100人。
	MaxPlayers *int64 `json:"MaxPlayers,omitempty" name:"MaxPlayers"`

	// 表示房主OpenId。最长不超过16个字符。
	OwnerOpenId *string `json:"OwnerOpenId,omitempty" name:"OwnerOpenId"`

	// 表示是否私有,私有指的是不允许其他玩家通过匹配加入房间。
	IsPrivate *bool `json:"IsPrivate,omitempty" name:"IsPrivate"`

	// 表示玩家详情列表。
	Players []*Player `json:"Players,omitempty" name:"Players" list`

	// 表示团队属性列表。
	Teams []*Team `json:"Teams,omitempty" name:"Teams" list`

	// 表示房间 ID。出参用,由后端返回。
	Id *string `json:"Id,omitempty" name:"Id"`

	// 表示房间类型。最长不超过32个字符。
	Type *string `json:"Type,omitempty" name:"Type"`

	// 表示创建方式:0.单人主动发起创建房间请求;1.多人在线匹配请求分配房间;2. 直接创建满员房间。调用云API的创房请求默认为3,目前通过云API调用只支持第3种方式。
	CreateType *int64 `json:"CreateType,omitempty" name:"CreateType"`

	// 表示自定义房间属性,不传为空字符串。最长不超过1024个字符。
	CustomProperties *string `json:"CustomProperties,omitempty" name:"CustomProperties"`

	// 表示房间帧同步状态。0表示未开始帧同步,1表示已开始帧同步,用于出参。
	FrameSyncState *int64 `json:"FrameSyncState,omitempty" name:"FrameSyncState"`

	// 表示帧率。由控制台设置,用于出参。
	FrameRate *int64 `json:"FrameRate,omitempty" name:"FrameRate"`

	// 表示路由ID。用于出参。
	RouteId *string `json:"RouteId,omitempty" name:"RouteId"`

	// 表示房间创建的时间戳(单位:秒)。
	CreateTime *int64 `json:"CreateTime,omitempty" name:"CreateTime"`

	// 表示开始帧同步时的时间戳(单位:秒),未开始帧同步时返回为0。
	StartGameTime *int64 `json:"StartGameTime,omitempty" name:"StartGameTime"`

	// 表示是否禁止加入房间。出参使用,默认为False,通过SDK的ChangeRoom接口可以修改。
	IsForbidJoin *bool `json:"IsForbidJoin,omitempty" name:"IsForbidJoin"`

	// 表示房主PlayerId。
	Owner *string `json:"Owner,omitempty" name:"Owner"`
}

type Team

type Team struct {

	// 队伍ID。最长不超过16个字符。
	Id *string `json:"Id,omitempty" name:"Id"`

	// 队伍名称。最长不超过32个字符。
	Name *string `json:"Name,omitempty" name:"Name"`

	// 队伍最小人数。最大不超过100人。
	MinPlayers *int64 `json:"MinPlayers,omitempty" name:"MinPlayers"`

	// 队伍最大人数。最大不超过100人。
	MaxPlayers *int64 `json:"MaxPlayers,omitempty" name:"MaxPlayers"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL