Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 751 Bytes

README.md

File metadata and controls

33 lines (26 loc) · 751 Bytes

RequestTrackerInterface

  • Requires jQuery to do AJAX.
  • Implement RT.nonJqueryAjax method to avoid it.
  • Remember about CORS. Was born to work inside chrome extension.

Usage:

var RT = new RTIConstructor({
    url: 'url.to.rt', // default to some RT demo
    debug: false // default true, because very-very raw and dev
});

RT.getTicket(1, onGetTicket);

function onGetTicket(res){
    if (!res.success){
        console.error(res.errorText);
    }else{
        doSomethingWith(res.ticketData);
    }
}

OR

define([
    'rt'
], function(RTIConstructor){
    RT = new RTIConstructor({
        url: 'url.to.rt'
    });
    RT.getTicket(1, onGetTicket);    
});