Skip to content

Commit a5d5f5d

Browse files
author
Marko Obrovac
committed
Parsoid: Throw errors for unimplemented methods
Bug: T230791
1 parent cce372e commit a5d5f5d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

lib/parsoid.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,44 @@ class ParsoidService {
145145
}
146146
}
147147

148+
/**
149+
* Assembles the request that is to be used to call the Parsoid service
150+
*
151+
* @param {Object} req the original request received by the module
152+
* @param {string} path the path portion of the URI, without the domain or API version
153+
* @param {Object} [headers] the headers to send, defaults to req.headers
154+
* @param {Object} [body] the body of the request, defaults to undefined
155+
* @return {Object} the request object to send
156+
*/
157+
_getParsoidReq(req, path, headers, body) {
158+
throw new Error('Parsoid module: _getParsoidReq() not implemented!');
159+
}
160+
161+
/**
162+
* Gets the URI of a bucket for the latest Parsoid content
163+
*
164+
* @param {string} domain the domain name
165+
* @param {string} title the article title
166+
* @return {HyperSwitch.URI}
167+
*/
168+
_getLatestBucketURI(domain, title) {
169+
throw new Error('Parsoid module: _getLatestBucketURI() not implemented!');
170+
}
171+
172+
/**
173+
* Gets the URI of a bucket for stashing Parsoid content. Used both for stashing
174+
* original HTML/Data-Parsoid for normal edits as well as for stashing transforms
175+
*
176+
* @param {string} domain the domain name
177+
* @param {string} title the article title
178+
* @param {number} revision the revision of the article
179+
* @param {string} tid the TID of the content
180+
* @return {HyperSwitch.URI}
181+
*/
182+
_getStashBucketURI(domain, title, revision, tid) {
183+
throw new Error('Parsoid module: _getStashBucketURI() not implemented!');
184+
}
185+
148186
/**
149187
* Get full content from the stash bucket.
150188
* @param {HyperSwitch} hyper the hyper object to route requests

0 commit comments

Comments
 (0)