cz.xprees.event-logging 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ namespace Xprees.EventLogging.Api
12
12
  {
13
13
  public class EventLoggingApi : IEventLoggingApi
14
14
  {
15
- public const string DefaultEndpoint = "https://eventlog-service-phkfk465ha-ew.a.run.app";
15
+ public const string DefaultEndpoint = "https://cf-collector.xprees.com/";
16
16
 
17
17
  private readonly string _baseUrl;
18
18
  private string LogsUri => $"{_baseUrl}/logs";
@@ -7,16 +7,16 @@ namespace Xprees.EventLogging.Api
7
7
  {
8
8
  public interface IEventLoggingApi
9
9
  {
10
- /// <summary>
11
10
  /// Call this method before logging start to warm up the connection (otherwise the first log will be slow)
12
- /// </summary>
13
- /// <returns>Success</returns>
14
11
  UniTask<bool> Warmup(CancellationToken cancellationToken = default);
15
12
 
13
+ /// Sends a single event log to API endpoint, which will return success flag. It's recommended to use <seealso cref="SendEventLogsBatch"/> for most cases and best performance.
16
14
  UniTask<bool> SendEventLog(EventLog log, CancellationToken cancellationToken = default);
17
15
 
16
+ /// Sends a batch of event logs to API endpoint, which will return success flag. This is the recommended way to send logs for better performance and minimized network traffic.
18
17
  UniTask<bool> SendEventLogsBatch(List<EventLog> logs, CancellationToken cancellationToken = default);
19
18
 
19
+ /// Returns a list of all known scenario names from the API endpoint.
20
20
  UniTask<string[]> GetScenarioNames(CancellationToken cancellationToken = default);
21
21
  }
22
22
  }
@@ -46,7 +46,8 @@ namespace Xprees.EventLogging.Extensions
46
46
  request.SetRequestHeader("Content-Type", "application/json");
47
47
  }
48
48
 
49
- public async static UniTask<UnityWebRequest.Result> TestConnection(CancellationToken cancellationToken = default)
49
+ /// Tries to Request neverssl.com to check that internet connection is working
50
+ public async static UniTask<UnityWebRequest.Result> TestInternetConnection(CancellationToken cancellationToken = default)
50
51
  {
51
52
  var request = UnityWebRequest.Get("http://neverssl.com");
52
53
  try
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "cz.xprees.event-logging",
3
3
  "displayName": "Event Logging",
4
- "version": "1.0.13",
4
+ "version": "1.0.15",
5
5
  "unity": "2021.3",
6
6
  "description": "This package provides a simple way to log events in your game.",
7
- "license": "MIT",
7
+ "license": "Apache-2.0",
8
8
  "category": "Core",
9
9
  "dependencies": {
10
10
  "com.cysharp.unitask": "2.5.10",