@tryghost/mg-ghost-api 0.4.24 → 0.4.25
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.
- package/LICENSE +1 -1
- package/README.md +3 -3
- package/lib/fetch.js +4 -4
- package/package.json +3 -3
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Migrate Ghost API
|
|
2
2
|
|
|
3
|
-
Export content from an existing Ghost installation using the [Admin API](https://ghost.org/
|
|
3
|
+
Export content from an existing Ghost installation using the [Admin API](https://docs.ghost.org/admin-api), and generate a `zip` file you can import into a Ghost installation.
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
## Install
|
|
@@ -82,7 +82,7 @@ migrate ghost --url https://example.com --apikey 1234abcd --batch 5 --limit 10 -
|
|
|
82
82
|
|
|
83
83
|
This will get the first 50 posts with the tag `news` or `press`, in 5 batches of 10 posts, exclude pages, and show all available output in the console.
|
|
84
84
|
|
|
85
|
-
See the [Filter documentation](https://ghost.org/
|
|
85
|
+
See the [Filter documentation](https://docs.ghost.org/content-api/filtering) for more info.
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
## Develop
|
|
@@ -111,4 +111,4 @@ yarn dev ghost --url https://example.com --apikey 1234abcd
|
|
|
111
111
|
|
|
112
112
|
# Copyright & License
|
|
113
113
|
|
|
114
|
-
Copyright (c) 2013-
|
|
114
|
+
Copyright (c) 2013-2026 Ghost Foundation - Released under the [MIT license](LICENSE).
|
package/lib/fetch.js
CHANGED
|
@@ -3,7 +3,7 @@ import ghostAPI from '@tryghost/admin-api';
|
|
|
3
3
|
const contentStats = async (options) => {
|
|
4
4
|
const requestOptions = {
|
|
5
5
|
url: options.url,
|
|
6
|
-
version: '
|
|
6
|
+
version: 'v6.0',
|
|
7
7
|
key: options.apikey
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -24,14 +24,14 @@ const contentStats = async (options) => {
|
|
|
24
24
|
const discover = async (options) => {
|
|
25
25
|
const requestOptions = {
|
|
26
26
|
url: options.url,
|
|
27
|
-
version: '
|
|
27
|
+
version: 'v6.0',
|
|
28
28
|
key: options.apikey
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const site = new ghostAPI(requestOptions);
|
|
32
32
|
|
|
33
|
-
const posts = (options.posts) ? await site.posts.browse({limit: options.limit}) : null;
|
|
34
|
-
const pages = (options.pages) ? await site.pages.browse({limit: options.limit}) : null;
|
|
33
|
+
const posts = (options.posts) ? await site.posts.browse({limit: options.limit, filter: options?.postFilter ?? null}) : null;
|
|
34
|
+
const pages = (options.pages) ? await site.pages.browse({limit: options.limit, filter: options?.postFilter ?? null}) : null;
|
|
35
35
|
const users = await site.users.browse({limit: options.limit});
|
|
36
36
|
|
|
37
37
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/mg-ghost-api",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.25",
|
|
4
4
|
"repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-ghost-api",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"jest-extended": "6.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tryghost/admin-api": "1.14.
|
|
28
|
+
"@tryghost/admin-api": "1.14.4"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "027225930710c0643603f6ae346dc76504d9bb7a"
|
|
31
31
|
}
|