Using API requests
public static <Res extends TLType, Req extends TLCall<Res>> Observable<Res> postAccount(TPContext context, SessionCall<Res, Req> call)
public static <Res extends TLType, Req extends TLCall<Res> & TLRequest> Observable<Res> postUser(TPContext context, String orgToken, SessionCall<Res, Req> userCall) { // construct request object from library with desired paremeters
TLGetPublicOrganizations request = new TLGetPublicOrganizations(limit, offset);
// all request should be made through live session context
return session
.postAccount(SessionCall.ensure(request)) // constructs "ensure" request and use wrapper postAcconut
.subscribeOn(scheduler) // make requests apart from ui thread
.map(response -> OrganizationFactory.organizationFromTlList(response.getOrganizations())); private fun onFirstComponentStarted(component: Any) {
TPLog.d(TAG, "[onFirstComponentStarted] cmp: %s", component)
sessionSubscription?.unsubscribe()
sessionComponent.session.start()
}Last updated
