@tryghost/admin-api 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +15 -1
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -6,6 +6,15 @@ const token = require('./token');
6
6
  const supportedVersions = ['v2', 'v3', 'v4', 'v5', 'canary'];
7
7
  const packageName = '@tryghost/admin-api';
8
8
 
9
+ /**
10
+ *
11
+ * @param {Object} options
12
+ * @param {String} options.url
13
+ * @param {String} [options.ghostPath]
14
+ * @param {String} [options.version]
15
+ * @param {Function} [options.makeRequest]
16
+ * @param {String} [options.host] Deprecated
17
+ */
9
18
  module.exports = function GhostAdminAPI(options) {
10
19
  if (this instanceof GhostAdminAPI) {
11
20
  return GhostAdminAPI(options);
@@ -35,7 +44,12 @@ module.exports = function GhostAdminAPI(options) {
35
44
 
36
45
  const config = Object.assign({}, defaultConfig, options);
37
46
 
38
- // new GhostAdminAPI({host: '...'}) is deprecated
47
+ //
48
+ /**
49
+ * host parameter is deprecated
50
+ * @deprecated use "url" instead
51
+ * @example new GhostAdminAPI({host: '...'})
52
+ */
39
53
  if (config.host) {
40
54
  // eslint-disable-next-line
41
55
  console.warn(`${packageName}: The 'host' parameter is deprecated, please use 'url' instead`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/admin-api",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "repository": "https://github.com/TryGhost/SDK/tree/master/packages/admin-api",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -31,5 +31,5 @@
31
31
  "form-data": "^4.0.0",
32
32
  "jsonwebtoken": "^8.4.0"
33
33
  },
34
- "gitHead": "36ffe70168eb2ad3eaefa0dc63a35697b284c9e7"
34
+ "gitHead": "dbf4ab41a6964422987a68c4327336692a54527f"
35
35
  }