Click or drag to resize
AuthenticatedSessionExecuteAsync Method (ICustomAudiencesRequest)
Executes the ICustomAudiencesRequest asynchronously.

Namespace: KomfoSharp.Sessions.Authenticated
Assembly: KomfoSharp (in KomfoSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public Task<ICustomAudiencesResponse> ExecuteAsync(
	ICustomAudiencesRequest customAudiencesRequest
)

Parameters

customAudiencesRequest
Type: KomfoSharp.Sessions.Authenticated.Requests.Ads.CustomAudiencesICustomAudiencesRequest
The custom audiences request.

Return Value

Type: TaskICustomAudiencesResponse
The TaskTResult.

Implements

IAuthenticatedSessionExecuteAsync(ICustomAudiencesRequest)
Examples
using (var komfoSession = komfoSessions
  .Authenticated
  .Token(token)
  .Create())
{
  var customAudiencesRequest = komfoSession.Requests.Ads.CustomAudiences.Create();

  var customAudiencesResponse = await komfoSession.ExecuteAsync(customAudiencesRequest);

  foreach (var customAudience in customAudiencesResponse.Data)
  {
    this.ShowCustomAudience(customAudience);
  }
}
using (var komfoSession = komfoSessions
  .Authenticated
  .Token(token)
  .Create())
{
  var customAudiencesRequest = komfoSession.Requests.Ads.CustomAudiences
    .WithPolling(polling => polling
      .Interval(TimeSpan.FromSeconds(15))
      .Attempts(4))
    .Create();

  var customAudiencesResponse = await komfoSession.ExecuteAsync(customAudiencesRequest);

  foreach (var customAudience in customAudiencesResponse.Data)
  {
    this.ShowCustomAudience(customAudience);
  }
}
See Also