// Gets a new, unique player ID from the metrics web service public string GetNewPlayerID() { SimpleRESTClient _PlayerIDFetcher = new SimpleRESTClient("GET", _ServerBaseURL + "players/get_new_id"); return _PlayerIDFetcher.GetSimpleString(); }
string _ServerBaseURL; // The base URL to the metrics web service #endregion Fields #region Constructors // Initialize a metrics wrapper // serverBaseURL - The base URL to the metrics web service, such as http://api.indiemetrics.com // gameKey - The secret game key for the game for which this wrapper will recording information public MetricsWrapper(string serverBaseURL, string gameKey) { _ServerBaseURL = serverBaseURL; _GameKey = gameKey; _EventPostSender = new SimpleRESTClient("POST", _ServerBaseURL + "events"); }