Beispiel #1
0
    public void GetPet()
    {
        var operation = pet.GetOperation(AOOperationType.GET);

        operation.SetParameterValue("id", petIdToGet);

        pet.ExecuteOperation <Pet>(operation)
        .Then(pet =>
        {
            Debug.Log("Pet ID: " + pet.id + ", type: " + pet.type + ", price: " + pet.price);
        });
    }
Beispiel #2
0
    public void GetPets()
    {
        var operation = pets.GetOperation(AOOperationType.GET);

        operation.SetParameterValue("tags", tags);
        operation.SetParameterValue("limit", limit.ToString());
        operation.ignoreCache = true;

        pets.ExecuteOperation <List <Pet> >(operation)
        .Then(pets =>
        {
            pets.ForEach(pet =>
            {
                Debug.Log("Pet ID: " + pet.id + ", type: " + pet.type + ", price: " + pet.price);
            });
        })
        .Catch(err =>
        {
            Debug.Log(err);
        });
    }