本文整理匯總了Golang中github.com/ChimeraCoder/anaconda.TwitterApi.GetOEmbedId方法的典型用法代碼示例。如果您正苦於以下問題:Golang TwitterApi.GetOEmbedId方法的具體用法?Golang TwitterApi.GetOEmbedId怎麽用?Golang TwitterApi.GetOEmbedId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/ChimeraCoder/anaconda.TwitterApi
的用法示例。
在下文中一共展示了TwitterApi.GetOEmbedId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: CreateTranslationHIT
func CreateTranslationHIT(a *anaconda.TwitterApi, auth *aws.Auth, tweet anaconda.Tweet, title string, description string, displayName string, rewardAmount string, assignmentDuration int, lifetime time.Duration, keywords []string) (*mtwerk.CreateHITResponse, error) {
const rewardCurrencyCode = "USD" // This is the only one supported for now by Amazon, anyway
const responseGroup = "Minimal"
const autoApprovalDelay = 0 // auto-approve immediately
// Get the embedded tweet to render
embed, err := a.GetOEmbedId(tweet.Id, nil)
if err != nil {
return nil, err
}
hq := mtwerk.HTMLQuestionContent{tweet.IdStr, title, description, "http://www.emojidick.com/emoji.png", tweet, embed}
questionString, err := parseQuestionContent(hq)
if err != nil {
return nil, err
}
resp, err := mtwerk.CreateHIT(auth, title, description, questionString, rewardAmount, rewardCurrencyCode, assignmentDuration, lifetime, keywords, autoApprovalDelay, tweet.IdStr, tweet.IdStr, responseGroup)
return resp, err
}