@tryghost/mg-ghost-api 0.4.23 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2013-2025 Ghost Foundation
3
+ Copyright (c) 2013-2026 Ghost Foundation
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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/docs/api/v2/admin/), and generate a `zip` file you can import into a Ghost installation.
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/docs/content-api/#filtering) for more info.
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-2025 Ghost Foundation - Released under the [MIT license](LICENSE).
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: 'v2.0',
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: 'v2.0',
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.23",
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.0"
28
+ "@tryghost/admin-api": "1.14.4"
29
29
  },
30
- "gitHead": "89e6e38587face966cdfadfbbc74aef95c594c7c"
30
+ "gitHead": "027225930710c0643603f6ae346dc76504d9bb7a"
31
31
  }