APIs

APIs #

This document outlines API calls and responses for each LootLocker system.

Responses #

Standard Response #

Every response inherits from the LootLockerResponse.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
    public class LootLockerResponse
    {
    	public bool hasError;
    	public int statusCode;
    	public string text;
    	public bool status;
    	public string message;
    	public string Error;
    	public string EventId;
    }

In any response coming from the callback of all LootLocker methods, you get the response above. You can get the raw text and deserialize into any JSON structure that you want.

Example GetPersistentStorageResponse Response #

We also have a class for each response. The response class contains all the variables from any JSON response from all methods. You can see this when checking out the Sample App that comes with the SDK. You can also check the API responses for the JSON response expected.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
       // Example json
        {
        "success": true,
        "payload": [
            {
                "key": "user.answer",
                "value": "42"
            }
        ]
    	}
        
        //Response Class
        public class GetPersistentStorageResponse : LootLockerResponse
        {
            public bool success { get; set; }
            public Payload[] payload { get; set; }
        }
        public class Payload
        {
            public string key { get; set; }
            public string value { get; set; }
        }

From the example above you can get the data from the JSON without worrying about deserializing yourself.

Authentication With Steam #

Please read over the quickstark guide for how to use the verify calls

https://docs.lootlocker.io/authenticating-players-with-unity/

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText,deviceId;
    
    LootLockerSDKManager.VerifyID(deviceId, (response) =>
    {
    	if (response.success)
    	{
    		labelText = "Successful";
    	}
    	else
    	{
    		labelText = "failed: " + response.Error;
    	}
    });

Session/Authentication Request #

For non steam users, Making your first call should be the session call, You do not need to drag anything into the scene or init the sdk. It does this for you. In order for you to make your very first call. You only need to send the device id. You can do the following:

  1. Create a new C# Script.
  2. Copy the script below and paste it there.
  3. The syntax is pretty basic
    1. LootLockerSDKManager: Our sdk manager script, you can view this yourself to see all the functions we support

    2. StartSession: Function in the sdk you need to call

    3. DeviceId: data to send to the sdk to make a session call, this should be unique to the player. It allows for really fast authentication without the need for a username or password. You could generate a Unique ID for your players and save this somewhere on the device or you can decide to use a device identifier to make sure anytime the user downloads your app. They can easily retrieve their data.

    4. Response: This is a class with all the data from the json

      {

      "success": true,
            
      "session_token": "e6fa44946f077dd9fe67311ab3f188c596df9969",
            
      "player_id": 3,
            
      "public_uid": "TSEYDXD8",
            
      "check_grant_notifications": true,
            
      "check_deactivation_notifications": false,
            
      "seen_before": true
      

      }

      This means you can easily do response.success to get the success value from the json response from the server

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText,deviceId;
    
    LootLockerSDKManager.StartSession(DeviceId, (Response) =>
    {
        if (response.success)
        {
        	labelText = "Successful";
        }
        else
        {
        	labelText = "failed: " + response.Error;
        }
    });

Ending A Session #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText,deviceId;
    
    LootLockerSDKManager.EndSession(deviceId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Successful";
        }
        else
        {
        	labelText = "failed: " + response.Error;
        }
    });

Player #

Get Player Info #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetPlayerInfo((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Get Inventory List #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetInventory((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Get Currency Balance #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetBalance((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Submit XP #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.SubmitXp(Random.Range(1, 5), (response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Get Other Players XP And Level #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetXpAndLevel((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Player Asset Notifications #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetAssetNotification((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Player Asset Deactivation Notifications #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetDeactivatedAssetNotification((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Initiate DLC Migration #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.InitiateDLCMigration((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Get DLCs Migrated #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetDLCMigrated((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Set Profile Private #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.SetProfilePrivate((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Set Profile Public #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.SetProfilePublic((response) =>
    {
        if (response.success)
        {
        	labelText = "Successful " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.Error;
        }
    });

Character #

Character Loadouts #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetCharacterLoadout((response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Get Other Players Character Loadouts By Platform Identifier #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int characterID;
    string labelText;
    
    LootLockerSDKManager.GetOtherPlayersCharacterLoadout(characterID, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Update Character #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
    int characterID;
    string newCharacterName;
    bool isDefault;
    string labelText;
    
    LootLockerSDKManager.UpdateCharacter(characterID, newCharacterName, isDefault, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Equip Asset to Default Character #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetInstanceId;
    string labelText;
    
    LootLockerSDKManager.EquipIdAssetToDefaultCharacter(assetInstanceId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Equip Asset to Character By Id #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetId, assetVariationId, characterID;
    string labelText;
    
    LootLockerSDKManager.EquipGlobalAssetToCharacter(assetId, assetVariationId, characterID, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Unequip Asset to Default Character #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetId;
    string labelText;
    
    LootLockerSDKManager.UnEquipIdAssetToDefaultCharacter(assetId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Unequip Asset To Character By Id #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetId;
    string labelText;
    
    LootLockerSDKManager.UnEquipIdAssetToDefaultCharacter(assetId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Get Current Loadout to Default Character #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetCurrentLoadOutToDefaultCharacter((response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Get Other Players Loadout to Default Character #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int characterID;
    string labelText;
    
    LootLockerSDKManager.GetCurrentLoadOutToOtherCharacter(characterID, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Get Equippable Contexts to Default Character #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetEquipableContextToDefaultCharacter((response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Get Equippable Contexts by Chararacter #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetEquipableContextToDefaultCharacter((response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    })

Persistent Player Storage #

Get Entire Persistent Storage #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetEntirePersistentStorage((response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Get a Single Key From Persistent Storage #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetSingleKeyPersistentStorage((response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Updating / Creating Key/Value Pairs #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
    GetPersistentStoragRequest data = new GetPersistentStoragRequest();
    data.AddToPayload(new Payload { key = "this is a key", value = "this is a value" });
    string labelText;
    
    LootLockerSDKManager.UpdateOrCreateKeyValue(data, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Deleting a Key/Value Pair #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    string keyToDelete;
    string labelText;
    
    LootLockerSDKManager.DeleteKeyValue(keyToDelete, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Getting other players public Storage #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
        LootLockerSDKManager.GetOtherPlayersPublicKeyValuePairs(otherPlayerId, (response) =>
        {
            if (response.success)
            {
                labelText = "Success\n" + response.text;
            }
            else
            {
                labelText = "Failed\n" + response.text;
            }
        });

Asset #

Getting Contexts #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetContext((response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    }); 

Getting Asset List #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
Assets are paginated. The sdk automatically remembers the last call. So after calling GetAssetListWithCount. All subsequent calls should be with GetAssetNextList. If for some reason you want to reset the sdk to no longer keep track. You can call AssetRequest.ResetAssetCalls();

    int assetCountToDownload;
    string labelText;
    
    LootLockerSDKManager.GetAssetListWithCount(assetCountToDownload, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });    

Next count:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetCountToDownload;
    string labelText;
    
    LootLockerSDKManager.GetAssetNextList(int.Parse(assetCountToDownload), (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Getting Asset Information For One or More Assets #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetId;
    string labelText;
    
    LootLockerSDKManager.GetAssetInformation(assetId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Listing Favourite Assets #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.ListFavouriteAssets((response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Adding Favourite Assets #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    string labelText;
    int assetId;
    
    LootLockerSDKManager.AddFavouriteAsset(assetId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Removing Favourite Assets #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    string labelText;
    int assetId;
    
    LootLockerSDKManager.RemoveFavouriteAsset(assetId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Asset Instances #

Getting All Key Value Pairs #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetAllKeyValuePairsForAssetInstances((response) =>
    {
        if (response.success)
        {
        	labelText = "Success: " + response.text;
        }
        else
        {
        	labelText = response.text;
        }
    });

Getting All Key Value Pairs to an Instance #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int instanceId;
    string labelText;
    
    LootLockerSDKManager.GetAllKeyValuePairsToAnInstance(instanceId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success: " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.text;
        }
    });

Getting A Key Value Pair By Id #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
    string labelText;
    int assetId;
    int instanceId;
    
    LootLockerSDKManager.GetAKeyValuePairByIdForAssetInstances(assetId,instanceId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success: " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.text;
        }
    });

Creating A Key Value Pair #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
    int assetId;
    string key, value;
    string labelText;
    
    LootLockerSDKManager.CreateKeyValuePairForAssetInstances(assetId, key, value, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success: " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.text;
        }
    });

Updating One Or More Key Value Pairs #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    Dictionary<string, string> multipleTestKeys = new Dictionary<string, string>();
    
    multipleTestKeys.Add("key1", "value1");
    multipleTestKeys.Add("key2", "value2");
    int assetId;
    
    LootLockerSDKManager.UpdateOneOrMoreKeyValuePairForAssetInstances(assetId, multipleTestKeys, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success: " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.text;
        }
    });

Updating A Key Value Pair By Id #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
    int assetId;
    string labelText;
    string key, value;
    
    LootLockerSDKManager.UpdateKeyValuePairByIdForAssetInstances(assetId, key, value, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success: " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.text;
        }
    });

Delete A Key Value Pair #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetId,instanceId;
    string labelText;
    
    LootLockerSDKManager.DeleteKeyValuePairForAssetInstances(assetId, instanceId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success: " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.text;
        }
    });

Inspect a Loot Box #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetId;
    string labelText;
    
    LootLockerSDKManager.InspectALootBoxForAssetInstances(assetId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success: " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.text;
        }
    });

Open a Loot Box #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetId;
    string labelText;
    
    LootLockerSDKManager.OpenALootBoxForAssetInstances(assetId, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success: " + response.text;
        }
        else
        {
        	labelText = "Failed: " + response.text;
        }
    });

User Generated Content #

Creating an Asset Candidate #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    string assetName;
    string contextId;
    
        LootLockerSDKManager.CreatingAnAssetCandidate(assetName, (response) =>
        {
            if (response.success)
            {
                Debug.Log("Successful" + response.text);
            }
            else
            {
                Debug.Log("failed: " + response.Error);
            }
        }, contextId);

Updating an Asset Candidate #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
    int assetId;
    bool markAssetAsComplete;
    string assetName;
    
            LootLockerSDKManager.UpdatingAnAssetCandidate(assetId, markAssetAsComplete, (response) =>
             {
                 if (response.success)
                 {
                     Debug.Log("Successful"+ response.text);
                 }
                 else
                 {
                     Debug.Log("failed: " + response.Error);
                 }
             }, name: assetName);

Deleting an Asset Candidate #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    int assetId;
            LootLockerSDKManager.DeletingAnAssetCandidate(assetId, (response) =>
            {
                if (response.success)
                {
                    Debug.Log("Successful"+ response.text);
                }
                else
                {
                    Debug.Log("failed: " + response.Error);
                }
            });

Listing Asset Candidates #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    
            LootLockerSDKManager.ListingAssetCandidates((response) =>
            {
                if (response.success)
                {
                    Debug.Log("Successful" + response.text);
                }
                else
                {
                    Debug.Log("failed: " + response.Error);
                }
            });

Adding Files to Asset Candidates #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    int assetId;
    string labelText;
    string filePath;
    string fileName;
    public enums.FilePurpose filePurpose;
    
            LootLockerSDKManager.AddingFilesToAssetCandidates(assetId, filePath, fileName, filePurpose, (response) =>
            {
                if (response.success)
                {
                    Debug.Log("Successful" + response.text);
                }
                else
                {
                    Debug.Log("failed: " + response.Error);
                }
            });

Removing Files from an Asset Candidate #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    int assetId, fileId;
            LootLockerSDKManager.RemovingFilesFromAssetCandidates(assetId, fileId, (response) =>
            {
                if (response.success)
                {
                    Debug.Log("Successful"+ response.text);
                }
                else
                {
                    Debug.Log("failed: " + response.Error);
                }
            });

Purchasing #

Purchase Call #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    int assetId,variation_id;
    string labelText;
    
    LootLockerSDKManager.NormalPurchaseCall(asset_id, variation_id, (response) =>
    {
        if (response.success)
        {
        	labelText = "Successful purchase : " + response.text;
        }
        else
        {
        	labelText = "failed purchase : " + response.Error;
        }
    });

iOS In-App Purchases #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    string receipt_data;
    string labelText;
    
    LootLockerSDKManager.IosPurchaseVerification(receipt_data, (response) =>
    {
        if (response.success)
        {
        	labelText = "Successful verified purchase" + response.text;
        }
        else
        {
        	labelText = "failed to verify purchase : " + response.Error;
        }
    });

Android In-App Purchases #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    string labelText;
    string purchase_token,asset_id;
    
    LootLockerSDKManager.AndroidPurchaseVerification(purchase_token, asset_id, (response) =>
    {
        if (response.success)
        {
        	labelText = "Successful verified purchase" + response.text;
        }
        else
        {
        	labelText = "failed to verify purchase : " + response.Error;
        }
    });

Polling Order Status #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    string asset_id;
    string labelText;
    
    LootLockerSDKManager.PollingOrderStatus(asset_id, (response) =>
    {
        if (response.success)
        {
        	labelText = "Successful polled order status" + response.text;
        }
        else
        {
        	labelText = "failed to poll order status : " + response.Error;
        }
    });

Activating A Rental Asset #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    string labelText;
    int asset_id;
    
    LootLockerSDKManager.ActivatingARentalAsset(asset_id, (response) =>
    {
        if (response.success)
        {
        	labelText = "Successful activated a rental asset" + response.text;
        }
        else
        {
        	labelText = "failed to activate a rental asset : " + response.Error;
        }
    });

Trigger Events #

Triggering an Event #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    string eventName;
    string labelText;
    
    LootLockerSDKManager.TriggeringAnEvent(eventName, (response) =>
    {
        if (response.success)
        {
        	labelText = "Successful activated a rental asset" + response.text;
        }
        else
        {
        	labelText = "failed to activate a rental asset : " + response.Error;
        }
    });

Collectables #

Getting Collectables #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GettingCollectables((response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Collecting an Item #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText,itemToCollect;
    
    LootLockerSDKManager.CollectingAnItem(itemToCollect, (response) =>
    {
        if (response.success)
        {
        	labelText = "Success\n" + response.text;
        }
        else
        {
        	labelText = "Failed\n" + response.text;
        }
    });

Messages #

Get Messages #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    string labelText;
    
    LootLockerSDKManager.GetMessages((response) =>
    {
        if (response.success)
        {
        	labelText = "Successfully got messages:\n" + response.text;
        }
        else
        {
        	labelText = "failed to get messages :\n" + response.Error;
        }
    });