@gt6/sdk 1.0.26 → 1.0.27
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/dist/gt6-sdk.cjs.js +15 -0
- package/dist/gt6-sdk.cjs.js.map +1 -1
- package/dist/gt6-sdk.esm.js +15 -0
- package/dist/gt6-sdk.esm.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/modules/articles.d.ts +4 -0
- package/dist/modules/articles.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/gt6-sdk.cjs.js
CHANGED
@@ -131,6 +131,15 @@ class ArticlesAPI {
|
|
131
131
|
const response = await this.client.request(`/article-categories/platform-${config.platformId_p}-root-${categoryId}.json`);
|
132
132
|
return response.categories;
|
133
133
|
}
|
134
|
+
/**
|
135
|
+
* 2.2 获取文章分类列表(使用下级平台ID)
|
136
|
+
*/
|
137
|
+
async getCategories_a(rootCategoryId) {
|
138
|
+
const config = this.client.getConfig();
|
139
|
+
const categoryId = rootCategoryId || config.rootCategoryId;
|
140
|
+
const response = await this.client.request(`/big-article-categories/platform-${config.platformId}-root-${categoryId}.json`);
|
141
|
+
return response.categories;
|
142
|
+
}
|
134
143
|
/**
|
135
144
|
* 3. 获取文章标签列表
|
136
145
|
*/
|
@@ -2568,6 +2577,12 @@ class GT6SDK {
|
|
2568
2577
|
async getCategories_p(rootCategoryId_p) {
|
2569
2578
|
return this.articles.getCategories_p(rootCategoryId_p);
|
2570
2579
|
}
|
2580
|
+
/**
|
2581
|
+
* 2.2. 便捷方法:获取文章分类列表(使用下级平台ID)
|
2582
|
+
*/
|
2583
|
+
async getCategories_a(rootCategoryId) {
|
2584
|
+
return this.articles.getCategories_a(rootCategoryId);
|
2585
|
+
}
|
2571
2586
|
/**
|
2572
2587
|
* 3. 便捷方法:获取文章标签列表
|
2573
2588
|
*/
|