Skip to content

socobox/sbxcloudkotlin

Repository files navigation

sbxcloudkotlin

kotlin library

Implementattion:

implementation 'com.github.sbxcloud:sbxcloudkotlin:v0.3.1'

Usage

Initialization:

  sbxCoreService =SbxCore(applicationContext, "ibuyflowers").apply {
            initialize(domain,
                    url,
                     appKey)
        }

Register:

signUpRx(login: String, email: String, name: String, password: String)
                 .subscribeOn(Schedulers.newThread())
                 .observeOn(AndroidSchedulers.mainThread())
                 ....

Login:

sbxCoreService.loginRx(login: String, password: String)
                  .subscribeOn(Schedulers.newThread())
                  .observeOn(AndroidSchedulers.mainThread())
                  ....

Find:

sbxCoreService.find(model_name: String)
                  .andWhereIsEqual(field_name: String, value: Any)
                  .thenRx()
                  .subscribeOn(Schedulers.newThread())
                  .observeOn(AndroidSchedulers.mainThread())
                  ....