Exemplo n.º 1
0
 /// <summary>Call this at the very beginning to start using the library.</summary>
 /// <returns>Promise resolved when the process has finished, with the Cloud to be used for your operations (most
 ///     likely synchronously).</returns>
 /// <param name="apiKey">The community key.</param>
 /// <param name="apiSecret">The community secret (credentials when registering to CotC).</param>
 /// <param name="environment">The URL of the server. Should use one of the predefined constants.</param>
 /// <param name="httpVerbose">Set to true to output detailed information about the requests performed to CotC servers. Can be used
 ///     for debugging, though it does pollute the logs.</param>
 /// <param name="httpTimeout">Sets a custom timeout for all requests in seconds. Defaults to 1 minute.</param>
 /// <param name="httpType">HTTP layer to be used. Currently 0 is the default (mono-based) one. Works pretty well, but is severely
 ///     aged has a few issues on some platforms (which are all overcomable). Type 1 uses the new
 ///     UnityEngine.Experimental.Networking.UnityWebRequest class and is also supported on all platforms.</param>
 public static Promise<Cloud> Setup(string apiKey, string apiSecret, string environment, int loadBalancerCount, bool httpVerbose, int httpTimeout, int httpType)
 {
     var task = new Promise<Cloud>();
     lock (SpinLock) {
         Cloud cloud = new Cloud(apiKey, apiSecret, environment, loadBalancerCount, httpVerbose, httpTimeout, httpType);
         return task.PostResult(cloud);
     }
 }
Exemplo n.º 2
0
 internal CloudIndexing(Cloud cloud, string indexName, string domain)
 {
     Cloud = cloud;
     Domain = domain;
     IndexName = indexName;
 }
Exemplo n.º 3
0
 /// <summary>Only instantiated internally.</summary>
 /// <param name="gamerData">Gamer data as returned by our API calls (loginanonymous, etc.).</param>
 internal Gamer(Cloud parent, Bundle gamerData)
     : base(gamerData)
 {
     Cloud = parent;
     Update(gamerData);
 }