Builder class for a concrete instance of GameRequestContent
Расширение: | Object |
Реализует: | ShareModelBuilder |
Пакет: | model |
GameRequestContent.Builder()
public GameRequestContent.Builder()
setMessage(String)
Sets the message users receiving the request will see. The maximum length is 60 characters.
public Builder setMessage(String message)
Параметр | Описание |
---|---|
message | The message |
setTo(String)
Sets the user ID or user name the request will be sent to. If this is not specified, a friend selector will be displayed and the user can select up to 50 friends.
public Builder setTo(String to)
Параметр | Описание |
---|---|
to | The id or user name to send the request to |
setRecipients(List)
An array of user IDs, usernames or invite tokens of people to send request. If this is not specified, a friend selector will be displayed and the user can select up to 50 friends.
This is equivalent to the "to" parameter when using the web game request dialog.
public Builder setRecipients(List recipients)
Параметр | Описание |
---|---|
recipients | The list of user ids to send the request to |
setData(String)
Sets optional data which can be used for tracking; maximum length is 255 characters.
public Builder setData(String data)
Параметр | Описание |
---|---|
data | The data |
setTitle(String)
Sets an optional title for the dialog; maximum length is 50 characters.
public Builder setTitle(String title)
Параметр | Описание |
---|---|
title | The title |
setActionType(ActionType)
Sets the action type for this request
public Builder setActionType(ActionType actionType)
Параметр | Описание |
---|---|
actionType |
setObjectId(String)
Sets the open graph id of the object that action type will be performed on Only valid (and required) for ActionTypes SEND, ASKFOR
public Builder setObjectId(String objectId)
Параметр | Описание |
---|---|
objectId |
setFilters(Filters)
Sets the filters for everybody/app users/non app users
public Builder setFilters(Filters filters)
Параметр | Описание |
---|---|
filters |
setSuggestions(List)
Sets a list of user ids suggested as request receivers
public Builder setSuggestions(List suggestions)
Параметр | Описание |
---|---|
suggestions |
build()
Builds the object.
public Object build()
build()
public GameRequestContent build()
readFrom(ShareModel)
Reads the values from a ShareModel into the builder.
public ShareModelBuilder readFrom(ShareModel model)
Параметр | Описание |
---|---|
model | The source ShareModel |
readFrom(GameRequestContent)
public Builder readFrom(GameRequestContent content)
Параметр | Описание |
---|---|
content |