Skip to content

RomanPodymov/BackendlessQt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f4c127e · Feb 3, 2025

History

49 Commits
Jul 31, 2024
Jul 31, 2024
Feb 3, 2025
Feb 2, 2025
Oct 27, 2024
Sep 30, 2024
Sep 30, 2024
Feb 3, 2025
Feb 3, 2025
Feb 3, 2025
Feb 3, 2025
Aug 7, 2024
Jul 29, 2024
Aug 13, 2024
Feb 3, 2025
Feb 3, 2025

Repository files navigation

BackendlessQt

Qt wrapper for Backendless.

How to use it?

Create a new API instance

BackendlessAPI api(API("YOUR_APP_ID", "YOUR_REST_API_KEY"));

Register a new user

QObject::connect(&api.userAPI, &BackendlessUserAPI::registerUserResult, this, [](){
    // User is registered
});
api.userAPI.registerUser(BackendlessRegisterUser("myemail@email.com", "Roman", "Password"));

Sign in

QObject::connect(&api.userAPI, &BackendlessUserAPI::signInUserSuccess, this, [](auto user){
    // User is signed in
});
QObject::connect(&api.userAPI, &BackendlessUserAPI::signInUserErrorBackendless, this, [](auto error){
    // Wrong credentials
});
api.userAPI.signInUser("myemail@email.com", "Password");

Validate user token

QObject::connect(&api.userAPI, &BackendlessUserAPI::validateUserTokenSuccess, this, [](auto isValid){
    // Is user token valid?
});
api.userAPI.validateUserToken();

Add a new item to a table

QObject::connect(&api, &BackendlessAPI::itemAdded, this, [&](){
    // Item is added
});
api.addItemToTable(
    "TableName", 
    {
        {"propery", "value"}, 
        {"anotherProperty", "value"}
    }
);

Read table items

QObject::connect(&api, &BackendlessAPI::tableItemsLoaded, this, [&](auto response){
    qDebug() << "Loaded " << response;
});
api.loadTableItems("TableName");