AdRequest.Builder class
This is an archived version of the documentation. Actual documentation for all platforms can be found here.
Class for creating a targeted ad request.
Methods
Builder WithAge(string age) | Sets the user's age in the app. |
Builder WithContextQuery(string contextQuery) | Sets the search query that the user entered in the app. |
Builder WithContextTags(List<string> contextTags) | Sets a list of tags that describe the current user context. The list depends on which screen the user is on. |
Builder WithGender(string gender) | Sets the user's gender in the app. |
Builder WithLocation(Location location) | Sets the user location. |
Builder WithParameters(Dictionary<string, string> parameters) | Specifies a list of additional parameters. |
Builder WithAdRequest(AdRequest adRequest) | Sets the |
AdRequest Build() | Creates an |
Builder WithAge(string age) | Sets the user's age in the app. |
Builder WithContextQuery(string contextQuery) | Sets the search query that the user entered in the app. |
Builder WithContextTags(List<string> contextTags) | Sets a list of tags that describe the current user context. The list depends on which screen the user is on. |
Builder WithGender(string gender) | Sets the user's gender in the app. |
Builder WithLocation(Location location) | Sets the user location. |
Builder WithParameters(Dictionary<string, string> parameters) | Specifies a list of additional parameters. |
Builder WithAdRequest(AdRequest adRequest) | Sets the |
AdRequest Build() | Creates an |
Method description
Builder WithAge(string age)
public Builder WithAge(string age)
Sets the user's age in the app.
age | User age. |
age | User age. |
Returns:
An object of the AdRequest.Builder
class with the specified user age.
Builder WithContextQuery(string contextQuery)
public Builder WithContextQuery(string contextQuery)
Sets the search query that the user entered in the app.
contextQuery | The search query that the user entered in the app. |
contextQuery | The search query that the user entered in the app. |
Returns:
An object of the AdRequest.Builder
class with the specified search query.
Builder WithContextTags(List<string> contextTags)
public Builder WithContextTags(List<string> contextTags)
Sets a list of tags that describe the current user context. The list depends on which screen the user is on.
contextTags | A list of tags produced by the app. |
contextTags | A list of tags produced by the app. |
Returns:
An object of the AdRequest.Builder
class with a list of assigned tags.
Builder WithGender(string gender)
public Builder WithGender(string gender)
Sets the user's gender in the app.
gender | The gender of the user. |
gender | The gender of the user. |
Returns:
An object of the AdRequest.Builder
class with the specified gender.
Builder WithLocation(Location location)
public Builder WithLocation(Location location)
Sets the user location.
location | User location. |
location | User location. |
Returns:
An object of the AdRequest.Builder
class with the specified user location.
Builder WithParameters(Dictionary<string, string> parameters)
public Builder WithParameters(Dictionary<string, string> parameters)
Specifies a list of additional parameters.
parameters | Additional parameters. |
parameters | Additional parameters. |
Returns:
An object of the AdRequest.Builder
class with a list of additional parameters specified.
Builder WithAdRequest(AdRequest adRequest)
public Builder WithAdRequest(AdRequest adRequest)
Sets the AdRequest
object.
adRequest | An object of the AdRequest class. |
adRequest | An object of the AdRequest class. |
Returns:
An object of the AdRequest.Builder
class that was created based on the AdRequest
object passed.
AdRequest Build()
public AdRequest Build()
Creates an AdRequest
class object with data for a targeted ad request.
adRequest | An object of the AdRequest class. |
adRequest | An object of the AdRequest class. |
Returns:
An object of the AdRequest
class including the data for a targeted ad request.