Bitrix API

AdsAudience extends AdsAudience

Class AdsAudience.

Table of Contents

Methods

addAudience()  : int|null
Add audience.
addFromEntity()  : bool
Add to audience from entity.
addLookalikeAudience()  : mixed
addToAudience()  : bool
Add to audience
canUse()  : bool
Return true if it can use.
getAccounts()  : array<string|int, mixed>
Get accounts.
getAudiences()  : array<string|int, array{id: int, isSupportMultiTypeContacts: bool, supportedContactTypes: ?string[], status: string, name: string}>
Get audiences.
getAudienceWithNormalizedStatus()  : array<string|int, mixed>
getErrors()  : array<string|int, mixed>
Get errors.
getProviders()  : array<string|int, mixed>
Get providers.
getRegions()  : mixed
getService()  : Service
Get service.
getServiceTypes()  : array<string|int, mixed>
Get service types.
hasErrors()  : bool
Return true if it has errors.
removeAuth()  : void
Remove auth.
resetErrors()  : void
Reset errors.
useQueue()  : void
Use queue.

Methods

addAudience()

Add audience.

public static addAudience(string $type[, int|null $accountId = null ][, string|null $name = null ]) : int|null
Parameters
$type : string

Type.

$accountId : int|null = null

Account ID.

$name : string|null = null

Name.

Return values
int|null

addFromEntity()

Add to audience from entity.

public static addFromEntity(int $entityTypeId, int $entityId, AdsAudienceConfig $config) : bool
Parameters
$entityTypeId : int

Entity type ID.

$entityId : int

Entity ID.

$config : AdsAudienceConfig

Configuration.

Return values
bool

addLookalikeAudience()

public static addLookalikeAudience(mixed $type[, mixed $accountId = null ][, mixed $sourceAudienceId = null ][, mixed $options = [] ]) : mixed
Parameters
$type : mixed
$accountId : mixed = null
$sourceAudienceId : mixed = null
$options : mixed = []

addToAudience()

Add to audience

public static addToAudience(AdsAudienceConfig $config, array<string|int, mixed> $contacts) : bool
Parameters
$config : AdsAudienceConfig

Config.

$contacts : array<string|int, mixed>

Contacts.

Return values
bool

canUse()

Return true if it can use.

public static canUse() : bool
Return values
bool

getAccounts()

Get accounts.

public static getAccounts(string $type) : array<string|int, mixed>
Parameters
$type : string

Type.

Return values
array<string|int, mixed>

getAudiences()

Get audiences.

public static getAudiences(string $type[, int|null $accountId = null ]) : array<string|int, array{id: int, isSupportMultiTypeContacts: bool, supportedContactTypes: ?string[], status: string, name: string}>
Parameters
$type : string

Type.

$accountId : int|null = null

Account ID.

Return values
array<string|int, array{id: int, isSupportMultiTypeContacts: bool, supportedContactTypes: ?string[], status: string, name: string}>

getAudienceWithNormalizedStatus()

public static getAudienceWithNormalizedStatus(mixed $type, string $messageCode[, mixed $accountId = null ]) : array<string|int, mixed>
Parameters
$type : mixed
$messageCode : string
$accountId : mixed = null
Return values
array<string|int, mixed>

getErrors()

Get errors.

public static getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>

getProviders()

Get providers.

public static getProviders([array<string|int, mixed>|null $types = null ]) : array<string|int, mixed>
Parameters
$types : array<string|int, mixed>|null = null

Types.

Return values
array<string|int, mixed>

getRegions()

public static getRegions(mixed $type) : mixed
Parameters
$type : mixed

getServiceTypes()

Get service types.

public static getServiceTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasErrors()

Return true if it has errors.

public static hasErrors() : bool
Return values
bool

removeAuth()

Remove auth.

public static removeAuth(string $type) : void
Parameters
$type : string

Type.

resetErrors()

Reset errors.

public static resetErrors() : void

useQueue()

Use queue.

public static useQueue() : void

        
On this page

Search results