Class: Google::Apis::GamesV1::StatsResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/games_v1/classes.rb,
lib/google/apis/games_v1/representations.rb,
lib/google/apis/games_v1/representations.rb

Overview

A third party stats resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ StatsResponse

Returns a new instance of StatsResponse.



2878
2879
2880
# File 'lib/google/apis/games_v1/classes.rb', line 2878

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#avg_session_length_minutesFloat

Average session length in minutes of the player. E.g., 1, 30, 60, ... . Not populated if there is not enough information. Corresponds to the JSON property avg_session_length_minutes

Returns:

  • (Float)


2811
2812
2813
# File 'lib/google/apis/games_v1/classes.rb', line 2811

def avg_session_length_minutes
  @avg_session_length_minutes
end

#churn_probabilityFloat

The probability of the player not returning to play the game in the next day. E.g., 0, 0.1, 0.5, ..., 1.0. Not populated if there is not enough information. Corresponds to the JSON property churn_probability

Returns:

  • (Float)


2817
2818
2819
# File 'lib/google/apis/games_v1/classes.rb', line 2817

def churn_probability
  @churn_probability
end

#days_since_last_playedFixnum

Number of days since the player last played this game. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough information. Corresponds to the JSON property days_since_last_played

Returns:

  • (Fixnum)


2823
2824
2825
# File 'lib/google/apis/games_v1/classes.rb', line 2823

def days_since_last_played
  @days_since_last_played
end

#high_spender_probabilityFloat

The probability of the player going to spend beyond a threshold amount of money. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough information. Corresponds to the JSON property high_spender_probability

Returns:

  • (Float)


2830
2831
2832
# File 'lib/google/apis/games_v1/classes.rb', line 2830

def high_spender_probability
  @high_spender_probability
end

#kindString

Uniquely identifies the type of this resource. Value is always the fixed string games#statsResponse. Corresponds to the JSON property kind

Returns:

  • (String)


2836
2837
2838
# File 'lib/google/apis/games_v1/classes.rb', line 2836

def kind
  @kind
end

#num_purchasesFixnum

Number of in-app purchases made by the player in this game. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough information. Corresponds to the JSON property num_purchases

Returns:

  • (Fixnum)


2842
2843
2844
# File 'lib/google/apis/games_v1/classes.rb', line 2842

def num_purchases
  @num_purchases
end

#num_sessionsFixnum

The approximate number of sessions of the player within the last 28 days, where a session begins when the player is connected to Play Games Services and ends when they are disconnected. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough information. Corresponds to the JSON property num_sessions

Returns:

  • (Fixnum)


2850
2851
2852
# File 'lib/google/apis/games_v1/classes.rb', line 2850

def num_sessions
  @num_sessions
end

#num_sessions_percentileFloat

The approximation of the sessions percentile of the player within the last 30 days, where a session begins when the player is connected to Play Games Services and ends when they are disconnected. E.g., 0, 0.25, 0.5, 0.75. Not populated if there is not enough information. Corresponds to the JSON property num_sessions_percentile

Returns:

  • (Float)


2858
2859
2860
# File 'lib/google/apis/games_v1/classes.rb', line 2858

def num_sessions_percentile
  @num_sessions_percentile
end

#spend_percentileFloat

The approximate spend percentile of the player in this game. E.g., 0, 0.25, 0. 5, 0.75. Not populated if there is not enough information. Corresponds to the JSON property spend_percentile

Returns:

  • (Float)


2864
2865
2866
# File 'lib/google/apis/games_v1/classes.rb', line 2864

def spend_percentile
  @spend_percentile
end

#spend_probabilityFloat

The probability of the player going to spend the game in the next seven days. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough information. Corresponds to the JSON property spend_probability

Returns:

  • (Float)


2870
2871
2872
# File 'lib/google/apis/games_v1/classes.rb', line 2870

def spend_probability
  @spend_probability
end

#total_spend_next_28_daysFloat

The predicted amount of money that the player going to spend in the next 28 days. E.g., 1, 30, 60, ... . Not populated if there is not enough information. Corresponds to the JSON property total_spend_next_28_days

Returns:

  • (Float)


2876
2877
2878
# File 'lib/google/apis/games_v1/classes.rb', line 2876

def total_spend_next_28_days
  @total_spend_next_28_days
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
# File 'lib/google/apis/games_v1/classes.rb', line 2883

def update!(**args)
  @avg_session_length_minutes = args[:avg_session_length_minutes] if args.key?(:avg_session_length_minutes)
  @churn_probability = args[:churn_probability] if args.key?(:churn_probability)
  @days_since_last_played = args[:days_since_last_played] if args.key?(:days_since_last_played)
  @high_spender_probability = args[:high_spender_probability] if args.key?(:high_spender_probability)
  @kind = args[:kind] if args.key?(:kind)
  @num_purchases = args[:num_purchases] if args.key?(:num_purchases)
  @num_sessions = args[:num_sessions] if args.key?(:num_sessions)
  @num_sessions_percentile = args[:num_sessions_percentile] if args.key?(:num_sessions_percentile)
  @spend_percentile = args[:spend_percentile] if args.key?(:spend_percentile)
  @spend_probability = args[:spend_probability] if args.key?(:spend_probability)
  @total_spend_next_28_days = args[:total_spend_next_28_days] if args.key?(:total_spend_next_28_days)
end