Android Swift Objective-C

Making API Calls


Making Requests

You can make API calls using the built-in asynchronous object APIs included in the SDK. Not all objects are available from the client-side libraries.

Select

Payload.all(pl.Customer.select(), new Payload.Callback<List<pl.Customer>>() {
    public void then(List<pl.Customer> custs) {
    }
});

Create

Payload.create(pl.Customer(){{
    set("email", "test@gmail.com");
    set("name", "Test Account");
}}, new Payload.Callback<pl.Customer>() {
    public void then(pl.Customer cust) {}
});

Update

Payload.update(cust.set("email", "test@gmail.com"),
    new Payload.Callback<pl.Customer>() {
        public void then(pl.Customer cust) {}
    });

Delete

Payload.delete(cust, new Payload.Callback<pl.Customer>() {
    public void then(pl.Customer cust) {}
});