Skip to content

SDK to consume web-services of TitleToolBox, a Real Estate product by Benutech Inc.

Notifications You must be signed in to change notification settings

benutech-inc/ttb-sdk

Repository files navigation

TTB SDK (Software Development Kit)

SDK to consume web-services of Title ToolBox.

Installation

Include script file from a CDN (minified file ~11kbs)

<script src="https://cdn.jsdelivr.net/gh/benutech-inc/ttb-sdk@1.20.0/dist/ttbSdk.min.js"></script>

Bower

$ bower install ttb-sdk --save

NPM

Coming soon...

Usage

// instantiate the TTB SDK class with minimum info required
var ttb = new TTB({
  partnerKey: 'your-partner-key-here',
});

// build up your payload
var payload = {
  TbUser: {
    username: "awesomeuser99@domain.com",
    password: "secret_Password0"
  }
};

// call one of the SDK ready methods "login" to get user logged in
ttb.login(payload)
.then(function(res) {
  if (res.response.status === 'OK') {
    // user is successfully logged-in !!
    // your success code here to consume res.response.data for logged-in user info
    console.log(res.response.data);
  } else {
    // your failure code here to consume res.response.data for validation errors info
    console.log(res.response.data);
  }
}, function(err) {
  // your failure code here
})
.always(function() {
 // your on-complete code here as common for both success and failure
});

Documentation

For a detailed documentation on available methods, their parameters, and examples. Check out the live documentation over here.

Sandbox (Playground)

For a detailed and working examples 3rd-party site consumption, please check out the Sandbox site over here.

Issues

Please feel free to file any defect you find, on issue page

Contribution

(Private only) This package follows Company's needs and plans, and being developed by the internal development team only. For Contribution, Please Check out private contribution guideline over here.

Happy coding !

Thanks for trying Title Toolbox !