本文整理汇总了Golang中github.com/anaminus/rbxweb.Client.DoRawPost方法的典型用法代码示例。如果您正苦于以下问题:Golang Client.DoRawPost方法的具体用法?Golang Client.DoRawPost怎么用?Golang Client.DoRawPost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/anaminus/rbxweb.Client
的用法示例。
在下文中一共展示了Client.DoRawPost方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Wall
// Wall posts a message to a group wall. The account the client is logged into
// must have a group role that has permission to post to the group's wall.
//
// This function requires the client to be logged in.
func Wall(client *rbxweb.Client, groupID int32, message string) (success bool) {
page := client.GetURL(`www`, `/My/Groups.aspx`, url.Values{"gid": {client.I32toa(groupID)}})
err := client.DoRawPost(page, url.Values{
"ctl00$ctl00$cphRoblox$cphMyRobloxContent$GroupWallPane$NewPost": {message},
"ctl00$ctl00$cphRoblox$cphMyRobloxContent$GroupWallPane$NewPostButton": {},
"ctl00$ctl00$cphRoblox$cphMyRobloxContent$rbxGroupRoleSetMembersPane$currentRoleSetID": {},
})
if err != nil {
return false
}
return true
}
示例2: TradeRobux
func TradeRobux(client *rbxweb.Client, robux int64, tickets int64, limit bool, split bool) (err error) {
page := client.GetURL(`www`, `/My/Money.aspx`, nil)
query := url.Values{
"__EVENTTARGET": {"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$SubmitTradeButton"},
"__VIEWSTATE": {},
"__EVENTVALIDATION": {},
"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$HaveCurrencyDropDownList": {"Robux"},
"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$HaveAmountTextBoxRestyle": {strconv.Itoa(robux)},
"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$WantCurrencyDropDownList": {"Tickets"},
"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$WantAmountTextBox": {strconv.Itoa(tickets)},
}
if limit {
query.Set("ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$OrderType", "LimitOrderRadioButton")
} else {
query.Set("ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$OrderType", "MarketOrderRadioButton")
}
if split {
query.Set("ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$AllowSplitTradesCheckBox", "on")
} else {
query.Set("ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$AllowSplitTradesCheckBox", "off")
}
err = client.DoRawPost(page, query)
return
}