@@ -2303,6 +2303,19 @@ public static void GetEntirePersistentStorage(Action<LootLockerGetPersistentStor
2303
2303
}
2304
2304
LootLockerAPIManager . GetEntirePersistentStorage ( onComplete ) ;
2305
2305
}
2306
+ /// <summary>
2307
+ /// Get the player storage as a Dictionary<string, string> for the currently active player (key/values).
2308
+ /// </summary>
2309
+ /// <param name="onComplete">onComplete Action for handling the response of type LootLockerGetPersistentStoragResponseDictionary</param>
2310
+ public static void GetEntirePersistentStorage ( Action < LootLockerGetPersistentStoragResponseDictionary > onComplete )
2311
+ {
2312
+ if ( ! CheckInitialized ( ) )
2313
+ {
2314
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerGetPersistentStoragResponseDictionary > ( ) ) ;
2315
+ return ;
2316
+ }
2317
+ LootLockerAPIManager . GetEntirePersistentStorage ( onComplete ) ;
2318
+ }
2306
2319
2307
2320
/// <summary>
2308
2321
/// Get a specific key from the player storage for the currently active player.
@@ -2339,6 +2352,47 @@ public static void UpdateOrCreateKeyValue(string key, string value, Action<LootL
2339
2352
LootLockerAPIManager . UpdateOrCreateKeyValue ( data , onComplete ) ;
2340
2353
}
2341
2354
2355
+ /// <summary>
2356
+ /// Update or create a key/value pair in the player storage for the currently active player.
2357
+ /// </summary>
2358
+ /// <param name="key">Name of the key</param>
2359
+ /// <param name="value">Value of the key</param>
2360
+ /// <param name="onComplete">onComplete Action for handling the response of type LootLockerGetPersistentStoragResponse</param>
2361
+ public static void UpdateOrCreateKeyValue ( Dictionary < string , string > keyValuePairs , bool isPublic , Action < LootLockerGetPersistentStoragResponse > onComplete )
2362
+ {
2363
+ if ( ! CheckInitialized ( ) )
2364
+ {
2365
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerGetPersistentStoragResponse > ( ) ) ;
2366
+ return ;
2367
+ }
2368
+ LootLockerGetPersistentStorageRequest data = new LootLockerGetPersistentStorageRequest ( ) ;
2369
+ // Add all the key value pairs to the payload
2370
+ foreach ( var keyValuePair in keyValuePairs )
2371
+ {
2372
+ data . AddToPayload ( new LootLockerPayload { key = keyValuePair . Key , value = keyValuePair . Value } ) ;
2373
+ }
2374
+ LootLockerAPIManager . UpdateOrCreateKeyValue ( data , onComplete ) ;
2375
+ }
2376
+
2377
+ /// <summary>
2378
+ /// Update or create a key/value pair in the player storage for the currently active player.
2379
+ /// </summary>
2380
+ /// <param name="key">Name of the key</param>
2381
+ /// <param name="value">Value of the key</param>
2382
+ /// <param name="isPublic">Is the key public?</param>
2383
+ /// <param name="onComplete">onComplete Action for handling the response of type LootLockerGetPersistentStoragResponse</param>
2384
+ public static void UpdateOrCreateKeyValue ( string key , string value , bool isPublic , Action < LootLockerGetPersistentStoragResponse > onComplete )
2385
+ {
2386
+ if ( ! CheckInitialized ( ) )
2387
+ {
2388
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerGetPersistentStoragResponse > ( ) ) ;
2389
+ return ;
2390
+ }
2391
+ LootLockerGetPersistentStorageRequest data = new LootLockerGetPersistentStorageRequest ( ) ;
2392
+ data . AddToPayload ( new LootLockerPayload { key = key , value = value , is_public = isPublic } ) ;
2393
+ LootLockerAPIManager . UpdateOrCreateKeyValue ( data , onComplete ) ;
2394
+ }
2395
+
2342
2396
/// <summary>
2343
2397
/// Update or create multiple key/value pairs in the player storage for the currently active player.
2344
2398
/// </summary>
0 commit comments