docs: function ( pm, url, type, data, success ) {
  
  	    	// Almost all calls to the API need to be done including a per-user API token.
  	    	// This token is passed into the constructor below and gets automatically 
  	    	// added to each call here if it is not already present.
  
  	    	if ( !pm.api_key && !url.match(/\/user\/login$/) ) {
  	    		throw( "PieceMakerApi: need an API_KEY, please login first to obtain one" );
  	    	}
  
  	    	var ts = (new Date()).getTime();
  	    	var callUrl = url + '.json';
  
  	        ajaxImpl({
  	                url: callUrl,
  	                type: type,
  	                dataType: 'json',
  	                data: data || {},
  					// before: function ( xhr ) {
  					// 	if ( !url.match(/\/user\/login$/) ) {
  					// 		xhr.setRequestHeader( 'X-Access-Key', api.api_key );
  					// 	}
  					// },
  					context: pm,
  	                success: function () {
  	                	if ( arguments && arguments[0] && 
  	                		 typeof arguments[0] === 'object' && 
  	                		 !(arguments[0] instanceof Array) && 
  	                		 !('queryTime' in arguments[0]) ) {
  	                		arguments[0]['queryTime'] = ((new Date()).getTime()) - ts;
  	                	}
  	                	success.apply( pm, arguments );
  	                },
  	                error: function (err) {
  	                    xhrError( pm, callUrl, type, err );
  	                },
  	                /* , xhrFields: { withCredentials: true } */
  					/* , headers: { 'Cookie' : document.cookie } */
  					headers: {
  						'X-Access-Key': pm.api_key
  					}
  	            });
  	    }