Skip to content

Commit 931c845

Browse files
committed
🔥 Dropped support for "host" parameter in Admin API SDK
refs https://github.com/TryGhost/Toolbox/issues/348 refs 9d44031 - The "host" parameter has been deprecated for few years now. It is not used in any of the clients we maintain and anybody who uses it externally had enough time to migrate.
1 parent ce79057 commit 931c845

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

‎packages/admin-api/lib/admin-api.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const resolveAPIPrefix = (version) => {
4343
* @param {String|Boolean} options.version - a version string like v3.2, v4.1, v5.8 or boolean value identifying presence of Accept-Version header
4444
* @param {Function} [options.makeRequest]
4545
* @param {Function} [options.generateToken]
46-
* @param {String} [options.host] Deprecated
4746
*/
4847
module.exports = function GhostAdminAPI(options) {
4948
if (this instanceof GhostAdminAPI) {
@@ -76,20 +75,6 @@ module.exports = function GhostAdminAPI(options) {
7675

7776
const config = Object.assign({}, defaultConfig, options);
7877

79-
//
80-
/**
81-
* host parameter is deprecated
82-
* @deprecated use "url" instead
83-
* @example new GhostAdminAPI({host: '...'})
84-
*/
85-
if (config.host) {
86-
// eslint-disable-next-line
87-
console.warn(`${packageName}: The 'host' parameter is deprecated, please use 'url' instead`);
88-
if (!config.url) {
89-
config.url = config.host;
90-
}
91-
}
92-
9378
if (config.version === undefined) {
9479
throw new Error(`${packageName} Config Missing: 'version' is required. E.g. ${supportedVersions.join(',')}`);
9580
}

0 commit comments

Comments
 (0)