Skip to content
Prev Previous commit
Next Next commit
Parsoid: Throw errors for unimplemented methods
Bug: T230791
  • Loading branch information
Marko Obrovac committed Oct 16, 2019
commit a5d5f5d2613f9c2f264fcdaf2f57413dd9e313d5
38 changes: 38 additions & 0 deletions lib/parsoid.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,44 @@ class ParsoidService {
}
}

/**
* Assembles the request that is to be used to call the Parsoid service
*
* @param {Object} req the original request received by the module
* @param {string} path the path portion of the URI, without the domain or API version
* @param {Object} [headers] the headers to send, defaults to req.headers
* @param {Object} [body] the body of the request, defaults to undefined
* @return {Object} the request object to send
*/
_getParsoidReq(req, path, headers, body) {
throw new Error('Parsoid module: _getParsoidReq() not implemented!');
}

/**
* Gets the URI of a bucket for the latest Parsoid content
*
* @param {string} domain the domain name
* @param {string} title the article title
* @return {HyperSwitch.URI}
*/
_getLatestBucketURI(domain, title) {
throw new Error('Parsoid module: _getLatestBucketURI() not implemented!');
}

/**
* Gets the URI of a bucket for stashing Parsoid content. Used both for stashing
* original HTML/Data-Parsoid for normal edits as well as for stashing transforms
*
* @param {string} domain the domain name
* @param {string} title the article title
* @param {number} revision the revision of the article
* @param {string} tid the TID of the content
* @return {HyperSwitch.URI}
*/
_getStashBucketURI(domain, title, revision, tid) {
throw new Error('Parsoid module: _getStashBucketURI() not implemented!');
}

/**
* Get full content from the stash bucket.
* @param {HyperSwitch} hyper the hyper object to route requests
Expand Down