Ads
Summary
| Members | Descriptions |
|---|---|
class URH_AdSubsystem | Ad 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
| Members | Descriptions |
|---|---|
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() const | Gets the API token used to make quick ad oppertunity attempts for the same user. |
public const TArray< FRHAPI_AdOpportunity> &GetOpportunities() const | Gets all ad oppertunities that have been been found during the session. |
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,RallyHereAPI::FDelegate_BeginNewSession Delegate) | Handles the response to a Begin New Ad Session call. |
protected virtual void OnFindOpportunities(const RallyHereAPI::FResponse_FindOpportunities & Resp,RallyHereAPI::FDelegate_FindOpportunities Delegate) | Handles the response to a Find Ad Oppertunities call. |
protected virtual void OnUpdateOpportunityById(const RallyHereAPI::FResponse_UpdateOpportunityById & Resp,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
-
RequestRequest information for obtaining a new session. -
DelegateCallback 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
-
RequestRequest information for requesting new ads. -
DelegateCallback 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
-
RequestRequest information for current ad oppertunities. -
DelegateCallback 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,RallyHereAPI::FDelegate_BeginNewSession Delegate)
Handles the response to a Begin New Ad Session call.
Parameters
-
RespResponse given for the call. -
DelegateDelegate passed in for original call to respond to when call completes.
protected virtual void OnFindOpportunities(const RallyHereAPI::FResponse_FindOpportunities & Resp,RallyHereAPI::FDelegate_FindOpportunities Delegate)
Handles the response to a Find Ad Oppertunities call.
Parameters
-
RespResponse given for the call. -
DelegateDelegate passed in for original call to respond to when call completes.
protected virtual void OnUpdateOpportunityById(const RallyHereAPI::FResponse_UpdateOpportunityById & Resp,RallyHereAPI::FDelegate_UpdateOpportunityById Delegate)
Handles the response to a Update Ad Oppertunities call.
Parameters
-
RespResponse given for the call. -
DelegateDelegate passed in for original call to respond to when call completes.