public static bool Track(string[] pluginIds) { var trackRequest = new TrackRequest { PlayerHash = PlayerHash, EnabledPluginIds = pluginIds }; return(SimpleHttpClient.Post(TrackUri, trackRequest)); }
public static bool Consent(bool consent) { if (consent) { LogFile.WriteLine($"Registering player consent on the statistics server"); } else { LogFile.WriteLine($"Withdrawing player consent, removing user data from the statistics server"); } var consentRequest = new ConsentRequest() { PlayerHash = PlayerHash, Consent = consent }; return(SimpleHttpClient.Post(ConsentUri, consentRequest)); }
public static PluginStat Vote(string pluginId, int vote) { if (votingToken == null) { LogFile.WriteLine($"Voting token is not available, cannot vote"); return(null); } LogFile.WriteLine($"Voting {vote} on plugin {pluginId}"); var voteRequest = new VoteRequest { PlayerHash = PlayerHash, PluginId = pluginId, VotingToken = votingToken, Vote = vote }; var stat = SimpleHttpClient.Post <PluginStat, VoteRequest>(VoteUri, voteRequest); return(stat); }