Skip to content

Instantly share code, notes, and snippets.

View olegflo's full-sized avatar
💭
🕉

Oleg Soroka olegflo

💭
🕉
View GitHub Profile
@olegflo
olegflo / gist:3927094
Created October 21, 2012 14:12
qbdoc
final QBLocation location = new QBLocation(35.0, 53.0, "I'm at this place");
System.out.println(location);
// output
// QBLocation{
// id=null,
// createdAt=null,
// updatedAt=null,
// userId=null,
// applicationId=null,
@olegflo
olegflo / gist:3926396
Created October 21, 2012 08:46
qbdoc
QBUser user = new QBUser();
user.setLogin("indianajones");
user.setPassword("indianapassword");
user.setEmail("indiana@jones.com");
// pass QBUser instance into create (register) user request
QBUsers.signUp(user, new QBCallbackImpl() {
@Override
public void onComplete(Result result) {
// check if request has been successful
@olegflo
olegflo / gist:3923552
Created October 20, 2012 15:21
qbdoc
// call method createLocation without context
QBLocations.createLocation(location, new QBCallbackImpl() {
@Override
public void onComplete(Result result) {
// use onComplete method without context
}
});
@olegflo
olegflo / gist:3923538
Created October 20, 2012 15:14
qbdoc
QBLocation location = new QBLocation();
location.setLatitude(35.0);
location.setLongitude(53.0);
location.setStatus("I'm at this place");
String someImportantString = "Dr. Henry Walton Indiana Jones";
QBLocations.createLocation(location, new QBCallbackImpl() {
@Override
public void onComplete(Result result, Object context) {
@olegflo
olegflo / gist:3923490
Created October 20, 2012 14:56
qbdoc
public class QBCallbackImpl implements QBCallback {
public void onComplete(Result result) {
// override in subclass
}
public void onComplete(Result result, Object context) {
// override in subclass
}
}
@olegflo
olegflo / gist:3923306
Created October 20, 2012 13:43
qbdoc
// register user
QBUsers.signUp("indianajones", "indianapassword", new QBCallbackImpl() {
@Override
public void onComplete(Result result) {
// result comes here
// check if result success
if (result.isSuccess()) {
// do stuff you need
}
}
@olegflo
olegflo / gist:3923298
Created October 20, 2012 13:41
qbdoc
// authorize user
QBUsers.signIn("indianajones", "indianapassword", new QBCallbackImpl() {
@Override
public void onComplete(Result result) {
// result comes here
// check if result success
if (result.isSuccess()) {
// do stuff you need
}
}
@olegflo
olegflo / gist:3923198
Created October 20, 2012 12:55
qbdoc
QBAuth.authorizeApp(new QBCallbackImpl() {
@Override
public void onComplete(Result result) {
// result comes here
// check if result success
if (result.isSuccess()) {
// do stuff you need
}
}
});
@olegflo
olegflo / gist:3923156
Created October 20, 2012 12:24
qbdoc
QBSettings.getInstance().fastConfigInit("961", "PBZxXW3WgGZtFZv", "vvHjRbVFF6mmeyJ");
proxy.php?type={GET|DELETE}&url={website_url}
proxy.php?type=POST&url={website_url}&data={data}