Class AdsAdapter
Represents an adapter for the Ads domain to simplify the command interface.
public class AdsAdapter
- Inheritance
-
AdsAdapter
- Inherited Members
Constructors
AdsAdapter(IDevToolsSession)
Initializes a new instance of the AdsAdapter class.
public AdsAdapter(IDevToolsSession session)
Parameters
sessionIDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
sessionis null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
GetAdMetrics(GetAdMetricsCommandSettings?, CancellationToken, int?, bool)
Retrieves ad metrics for the current page.
public Task<GetAdMetricsCommandResponse> GetAdMetrics(GetAdMetricsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetAdMetricsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetAdScripts(GetAdScriptsCommandSettings?, CancellationToken, int?, bool)
Retrieves ad scripts for the current page. To minimize payload size, this only returns the newly tracked ad scripts since the last call to getAdScripts (i.e., the delta).
public Task<GetAdScriptsCommandResponse> GetAdScripts(GetAdScriptsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetAdScriptsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool