class WeebSh::ReputationSettings
Represents a reputation settings object for shimakaze
Attributes
@return [String, nil] the ID of the account from the token
@return [Integer] the maximum reputation a user may receive
@return [Integer] the maximum reputation a user may receive per day
@return [Integer] the maximum reputation a user may receive
@return [Integer] the maximum reputation a user may receive per day
@return [Integer] the cooldown per reputation, this is set to time in seconds
@return [Integer] the number of reputations a user may give out per cooldown
@return [Integer] the cooldown per reputation, this is set to time in seconds
@return [Integer] the number of reputations a user may give out per cooldown
Public Class Methods
@!visibility private
# File lib/weeb/data.rb, line 308 def initialize(data, interface) @interface = interface @reputation_per_day = data['reputationPerDay'] @max_reputation = data['maximumReputation'] @max_reputation_per_day = data['maximumReputationReceivedDay'] @reputation_cooldown = data['reputationCooldown'] @account = data['account'] end
Public Instance Methods
@!visibility private
# File lib/weeb/data.rb, line 330 def inspect "#<WeebSh::ReputationSettings @reputation_per_day=#{@reputation_per_day.inspect} @max_reputation=#{@max_reputation.inspect} @max_reputation_per_day=#{@max_reputation_per_day.inspect} @reputation_cooldown=#{@reputation_cooldown.inspect}>" end
Save the settings on this object @return [ReputationSettings] the class itself
# File lib/weeb/data.rb, line 319 def save WeebSh::API::Shimakaze.set_settings(@interface, { reputationPerDay: @reputation_per_day, maximumReputation: @max_reputation, maximumReputationReceivedDay: @max_reputation_per_day, reputationCooldown: @reputation_cooldown }) self end