This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // call method createLocation without context | |
| QBLocations.createLocation(location, new QBCallbackImpl() { | |
| @Override | |
| public void onComplete(Result result) { | |
| // use onComplete method without context | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class QBCallbackImpl implements QBCallback { | |
| public void onComplete(Result result) { | |
| // override in subclass | |
| } | |
| public void onComplete(Result result, Object context) { | |
| // override in subclass | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| QBAuth.authorizeApp(new QBCallbackImpl() { | |
| @Override | |
| public void onComplete(Result result) { | |
| // result comes here | |
| // check if result success | |
| if (result.isSuccess()) { | |
| // do stuff you need | |
| } | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| QBSettings.getInstance().fastConfigInit("961", "PBZxXW3WgGZtFZv", "vvHjRbVFF6mmeyJ"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proxy.php?type={GET|DELETE}&url={website_url} | |
| proxy.php?type=POST&url={website_url}&data={data} |