gpg::PlayerStats

#include <playerstats.h>

A data structure that allows you to access data about a specific player.

Summary

Constructors and Destructors

PlayerStats()
PlayerStats(std::shared_ptr< const PlayerStatsImpl > impl)
Constructs a PlayerStats from a shared_ptr to a PlayerStatsImpl.
PlayerStats(const PlayerStats & copy_from)
Creates a copy of an existing PlayerStats object.
PlayerStats(PlayerStats && move_from)
Moves an existing PlayerStats object into a new one.
~PlayerStats()

Public functions

AverageSessionLength() const
float
Retrieves the average session length for this player, if known.
ChurnProbability() const
float
Retrieves the churn probability for this player, if known.
DaysSinceLastPlayed() const
int32_t
Retrieves the days since last played for this player, if known.
HasAverageSessionLength() const
bool
Returns whether or not this PlayerStats object has average session length available.
HasChurnProbability() const
bool
Returns whether or not this PlayerStats object has churn probability available.
HasDaysSinceLastPlayed() const
bool
Returns whether or not this PlayerStats object has days since last played available.
HasHighSpenderProbability() const
bool
Returns whether or not this PlayerStats object has high spender probability available.
HasNumberOfPurchases() const
bool
Returns whether or not this PlayerStats object has number of purchases available.
HasNumberOfSessions() const
bool
Returns whether or not this PlayerStats object has number of sessions available.
HasSessionPercentile() const
bool
Returns whether or not this PlayerStats object has session percentile available.
HasSpendPercentile() const
bool
Returns whether or not this PlayerStats object has spend percentile available.
HasSpendProbability() const
bool
Returns whether or not this PlayerStats object has spend probability available.
HasTotalSpendNext28Days() const
bool
Returns whether or not this PlayerStats object has total spend over next 28 days available.
HighSpenderProbability() const
float
Retrieves the high spender probability information for this player, if known.
NumberOfPurchases() const
int32_t
Retrieves the number of purchases for this player, if known.
NumberOfSessions() const
int32_t
Retrieves the number of sessions for this player, if known.
SessionPercentile() const
float
Retrieves the session percentile information for this player, if known.
SpendPercentile() const
float
Retrieves the spend percentile information for this player, if known.
SpendProbability() const
float
Retrieves the spend probability information for this player, if known.
TotalSpendNext28Days() const
float
Retrieves the total spend over next 28 days information for this player, if known.
Valid() const
bool
Returns true when the returned PlayerStats object is populated with data and is accompanied by a successful response status; false for an unpopulated user-created PlayerStats or for a populated one accompanied by an unsuccessful response status.
operator=(const PlayerStats & copy_from)
Assigns to this PlayerStats object by copying from another one.
operator=(PlayerStats && move_from)
Assigns to this PlayerStats object by moving another one into it.

Public functions

AverageSessionLength

float AverageSessionLength() const 

Retrieves the average session length for this player, if known.

HasAverageSessionLength() must return true for this function to be usable.

ChurnProbability

float ChurnProbability() const 

Retrieves the churn probability for this player, if known.

HasChurnProbability() must return true for this function to be usable.

DaysSinceLastPlayed

int32_t DaysSinceLastPlayed() const 

Retrieves the days since last played for this player, if known.

HasDaysSinceLastPlayed() must return true for this function to be usable.

HasAverageSessionLength

bool HasAverageSessionLength() const 

Returns whether or not this PlayerStats object has average session length available.

It must return true for AverageSessionLength() to be usable.

HasChurnProbability

bool HasChurnProbability() const 

Returns whether or not this PlayerStats object has churn probability available.

It must return true for ChurnProbability() to be usable.

HasDaysSinceLastPlayed

bool HasDaysSinceLastPlayed() const 

Returns whether or not this PlayerStats object has days since last played available.

It must return true for DaysSinceLastPlayed() to be usable.

HasHighSpenderProbability

bool HasHighSpenderProbability() const 

Returns whether or not this PlayerStats object has high spender probability available.

It must return true for HighSpenderProbability() to be usable.

HasNumberOfPurchases

bool HasNumberOfPurchases() const 

Returns whether or not this PlayerStats object has number of purchases available.

It must return true for NumberOfPurchases() to be usable.

HasNumberOfSessions

bool HasNumberOfSessions() const 

Returns whether or not this PlayerStats object has number of sessions available.

It must return true for NumberOfSessions() to be usable.

HasSessionPercentile

bool HasSessionPercentile() const 

Returns whether or not this PlayerStats object has session percentile available.

It must return true for SessionPercentile() to be usable.

HasSpendPercentile

bool HasSpendPercentile() const 

Returns whether or not this PlayerStats object has spend percentile available.

It must return true for SpendPercentile() to be usable.

HasSpendProbability

bool HasSpendProbability() const 

Returns whether or not this PlayerStats object has spend probability available.

It must return true for SpendProbability() to be usable.

HasTotalSpendNext28Days

bool HasTotalSpendNext28Days() const 

Returns whether or not this PlayerStats object has total spend over next 28 days available.

It must return true for TotalSpendNext28Days() to be usable.

HighSpenderProbability

float HighSpenderProbability() const 

Retrieves the high spender probability information for this player, if known.

HasHighSpenderProbability() must return true for this function to be usable.

NumberOfPurchases

int32_t NumberOfPurchases() const 

Retrieves the number of purchases for this player, if known.

HasNumberOfPurchases() must return true for this function to be usable.

NumberOfSessions

int32_t NumberOfSessions() const 

Retrieves the number of sessions for this player, if known.

HasNumberOfSessions() must return true for this function to be usable.

PlayerStats

 PlayerStats()

PlayerStats

 PlayerStats(
  std::shared_ptr< const PlayerStatsImpl > impl
)

Constructs a PlayerStats from a shared_ptr to a PlayerStatsImpl.

Intended for internal use by the API.

PlayerStats

 PlayerStats(
  const PlayerStats & copy_from
)

Creates a copy of an existing PlayerStats object.

PlayerStats

 PlayerStats(
  PlayerStats && move_from
)

Moves an existing PlayerStats object into a new one.

SessionPercentile

float SessionPercentile() const 

Retrieves the session percentile information for this player, if known.

HasSessionPercentile() must return true for this function to be usable.

SpendPercentile

float SpendPercentile() const 

Retrieves the spend percentile information for this player, if known.

HasSpendPercentile() must return true for this function to be usable.

SpendProbability

float SpendProbability() const 

Retrieves the spend probability information for this player, if known.

HasSpendProbability() must return true for this function to be usable.

TotalSpendNext28Days

float TotalSpendNext28Days() const 

Retrieves the total spend over next 28 days information for this player, if known.

HasTotalSpendNext28Days() must return true for this function to be usable.

Valid

bool Valid() const 

Returns true when the returned PlayerStats object is populated with data and is accompanied by a successful response status; false for an unpopulated user-created PlayerStats or for a populated one accompanied by an unsuccessful response status.

It must return true for the getter functions on this object to be usable.

operator=

PlayerStats & operator=(
  const PlayerStats & copy_from
)

Assigns to this PlayerStats object by copying from another one.

operator=

PlayerStats & operator=(
  PlayerStats && move_from
)

Assigns to this PlayerStats object by moving another one into it.

~PlayerStats

 ~PlayerStats()