You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
3.3 KiB
81 lines
3.3 KiB
|
1 year ago
|
package tada
|
||
|
|
|
||
|
|
const (
|
||
|
|
DemoURL = "://tadagaming.com/plusplayer/PlusTrial"
|
||
|
|
APIURL = "https://wb-api.tadagaming.com/api1"
|
||
|
|
APITest = "https://uat-wb-api.tadagaming.com/api1"
|
||
|
|
AgentID = "whale_Seamless"
|
||
|
|
TestKey = "ffe04e1978eeb112d958ddb6139ac47b9b121dc8"
|
||
|
|
AgentKey = "3a22424c73cb9b2c14a288da480db5b8492ff7b1"
|
||
|
|
|
||
|
|
LoginAPI = "/singleWallet/LoginWithoutRedirect"
|
||
|
|
)
|
||
|
|
|
||
|
|
const (
|
||
|
|
ErrorCodeSuccess = iota
|
||
|
|
ErrorCodeAccepted // 注单已承认
|
||
|
|
ErrorCodeNotEnoughBalance // 余额不足
|
||
|
|
ErrorCodeInvalidParameter // 参数无效
|
||
|
|
ErrorCodeTokenExpired // token过期
|
||
|
|
ErrorCodeOther // 其他错误
|
||
|
|
)
|
||
|
|
|
||
|
|
type AuthReq struct {
|
||
|
|
ReqID string `json:"reqId"` // 请求识别码
|
||
|
|
Token string `json:"token"` // token
|
||
|
|
}
|
||
|
|
|
||
|
|
type AuthResp struct {
|
||
|
|
ErrorCode int `json:"errorCode"` // 0成功
|
||
|
|
Message string `json:"message"` // 信息
|
||
|
|
UserName string `json:"username"` // 账号唯一识别名称
|
||
|
|
Currency string `json:"currency"` // 身上持有币种
|
||
|
|
Balance float64 `json:"balance"` // 余额
|
||
|
|
Token string `json:"token"` // token
|
||
|
|
}
|
||
|
|
|
||
|
|
// BetReq 请求下注
|
||
|
|
type BetReq struct {
|
||
|
|
ReqID string `json:"reqId"` // 请求识别码
|
||
|
|
Token string `json:"token"` // token
|
||
|
|
Currency string `json:"Currency"`
|
||
|
|
Game int `json:"game"` // 游戏代码
|
||
|
|
Round int64 `json:"round"` // 注单唯一识别值
|
||
|
|
WagersTime int64 `json:"wagersTime"` // 注单结账时间戳
|
||
|
|
BetAmount float64 `json:"betAmount"` // 押注金额
|
||
|
|
WinLoseAmount float64 `json:"winloseAmount"` // 发奖金额
|
||
|
|
IsFreeRound bool `json:"isFreeRound"` // 为true时表示离线开奖
|
||
|
|
UserId string `json:"userId"` // 玩家账号唯一值
|
||
|
|
TransactionID int64 `json:"transactionId"` // 离线开奖触发局局号
|
||
|
|
Platform string `json:"platform"` // 玩家装置信息
|
||
|
|
}
|
||
|
|
|
||
|
|
type BetResp struct {
|
||
|
|
ErrorCode int `json:"errorCode"` // 0成功
|
||
|
|
Message string `json:"message"` // 信息
|
||
|
|
UserName string `json:"username"` // 账号唯一识别名称
|
||
|
|
Currency string `json:"currency"` // 身上持有币种
|
||
|
|
Balance float64 `json:"balance"` // 余额
|
||
|
|
TxID int64 `json:"txId"` // 营运商注单号
|
||
|
|
Token string `json:"token"` // token
|
||
|
|
}
|
||
|
|
|
||
|
|
// SessionBetReq 请求下注
|
||
|
|
type SessionBetReq struct {
|
||
|
|
ReqID string `json:"reqId"` // 请求识别码
|
||
|
|
Token string `json:"token"` // token
|
||
|
|
Currency string `json:"Currency"`
|
||
|
|
Game int `json:"game"` // 游戏代码
|
||
|
|
Round int64 `json:"round"` // 注单唯一识别值
|
||
|
|
WagersTime int64 `json:"wagersTime"` // 注单结账时间戳
|
||
|
|
BetAmount float64 `json:"betAmount"` // 押注金额
|
||
|
|
WinLoseAmount float64 `json:"winloseAmount"` // 发奖金额
|
||
|
|
SessionID int64 `json:"sessionId"` // 牌局唯一值
|
||
|
|
Type int `json:"type"` // 注单类型 1下注 2结算
|
||
|
|
UserId string `json:"userId"` // 玩家账号唯一值
|
||
|
|
TurnOver float64 `json:"turnover"` // 有效投注
|
||
|
|
Preserve float64 `json:"preserve"` // 有效投注
|
||
|
|
Platform string `json:"platform"` // 玩家装置信息
|
||
|
|
SessionTotalBet float64 `json:"sessionTotalBet"` // 整一局总投注
|
||
|
|
}
|