Skip to content

Ads

Summary

MembersDescriptions
class URH_AdSubsystemAd Subsystem used for serving and responging to ad operrtunities for players.

class URH_AdSubsystem

class URH_AdSubsystem
: public URH_LocalPlayerSubsystemPlugin

Ad Subsystem used for serving and responging to ad operrtunities for players.

Summary

MembersDescriptions
public virtual void Initialize()Initialize the subsystem.
public virtual void Deinitialize()Safely tears down the subsystem.
public FHttpRequestPtr BeginNewSession(RallyHereAPI::FRequest_BeginNewSession Request,const RallyHereAPI::FDelegate_BeginNewSession & Delegate)Starts a session for serving ad oppertunities.
public FHttpRequestPtr FindOpportunities(RallyHereAPI::FRequest_FindOpportunities Request,const RallyHereAPI::FDelegate_FindOpportunities & Delegate)Attempts to find new ad oppertunities to present to the user.
public FHttpRequestPtr UpdateOpportunityById(RallyHereAPI::FRequest_UpdateOpportunityById Request,const RallyHereAPI::FDelegate_UpdateOpportunityById & Delegate)Updates the status of an ad oppertunity.
public FString GetAdApiToken() constGets the API token used to make quick ad oppertunity attempts for the same user.
public const TArray< FRHAPI_AdOpportunity> &GetOpportunities() constGets all ad oppertunities that have been been found during the session.
protected TArray< FRHAPI_AdOpportunity>OpportunitiesCached Ad Oppertunities.
protected FString XHzAdApiTokenAd API token used by the subsystem to make ad calls.
protected virtual void OnUserChanged()Callback that occurs whenever the local player this subsystem is associated with changes.
protected virtual void OnBeginNewSession(const RallyHereAPI::FResponse_BeginNewSession & Resp,const RallyHereAPI::FDelegate_BeginNewSession Delegate)Handles the response to a Begin New Ad Session call.
protected virtual void OnFindOpportunities(const RallyHereAPI::FResponse_FindOpportunities & Resp,const RallyHereAPI::FDelegate_FindOpportunities Delegate)Handles the response to a Find Ad Oppertunities call.
protected virtual void OnUpdateOpportunityById(const RallyHereAPI::FResponse_UpdateOpportunityById & Resp,const RallyHereAPI::FDelegate_UpdateOpportunityById Delegate)Handles the response to a Update Ad Oppertunities call.

Members

public virtual void Initialize()

Initialize the subsystem.

public virtual void Deinitialize()

Safely tears down the subsystem.

public FHttpRequestPtr BeginNewSession(RallyHereAPI::FRequest_BeginNewSession Request,const RallyHereAPI::FDelegate_BeginNewSession & Delegate)

Starts a session for serving ad oppertunities.

Parameters

  • Request Request information for obtaining a new session.

  • Delegate Callback Delegate for when session creation is complete.

Returns

Http Request for the session creation.

public FHttpRequestPtr FindOpportunities(RallyHereAPI::FRequest_FindOpportunities Request,const RallyHereAPI::FDelegate_FindOpportunities & Delegate)

Attempts to find new ad oppertunities to present to the user.

Parameters

  • Request Request information for requesting new ads.

  • Delegate Callback Delegate for when finding oppertunities is complete.

Returns

Http Request for the find oppertunities request.

public FHttpRequestPtr UpdateOpportunityById(RallyHereAPI::FRequest_UpdateOpportunityById Request,const RallyHereAPI::FDelegate_UpdateOpportunityById & Delegate)

Updates the status of an ad oppertunity.

Parameters

  • Request Request information for current ad oppertunities.

  • Delegate Callback Delegate for when updating oppertunities is complete.

Returns

Http Request for the update oppertunities request.

public FString GetAdApiToken() const

Gets the API token used to make quick ad oppertunity attempts for the same user.

Returns

The API Token.

public const TArray< FRHAPI_AdOpportunity> &GetOpportunities() const

Gets all ad oppertunities that have been been found during the session.

Returns

All ad oppertunities.

protected TArray< FRHAPI_AdOpportunity>Opportunities

Cached Ad Oppertunities.

protected FString XHzAdApiToken

Ad API token used by the subsystem to make ad calls.

protected virtual void OnUserChanged()

Callback that occurs whenever the local player this subsystem is associated with changes.

protected virtual void OnBeginNewSession(const RallyHereAPI::FResponse_BeginNewSession & Resp,const RallyHereAPI::FDelegate_BeginNewSession Delegate)

Handles the response to a Begin New Ad Session call.

Parameters

  • Resp Response given for the call.

  • Delegate Delegate passed in for original call to respond to when call completes.

protected virtual void OnFindOpportunities(const RallyHereAPI::FResponse_FindOpportunities & Resp,const RallyHereAPI::FDelegate_FindOpportunities Delegate)

Handles the response to a Find Ad Oppertunities call.

Parameters

  • Resp Response given for the call.

  • Delegate Delegate passed in for original call to respond to when call completes.

protected virtual void OnUpdateOpportunityById(const RallyHereAPI::FResponse_UpdateOpportunityById & Resp,const RallyHereAPI::FDelegate_UpdateOpportunityById Delegate)

Handles the response to a Update Ad Oppertunities call.

Parameters

  • Resp Response given for the call.

  • Delegate Delegate passed in for original call to respond to when call completes.