@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.esm.js
CHANGED
@@ -127,6 +127,15 @@ class ArticlesAPI {
|
|
127
127
|
const response = await this.client.request(`/article-categories/platform-${config.platformId_p}-root-${categoryId}.json`);
|
128
128
|
return response.categories;
|
129
129
|
}
|
130
|
+
/**
|
131
|
+
* 2.2 获取文章分类列表(使用下级平台ID)
|
132
|
+
*/
|
133
|
+
async getCategories_a(rootCategoryId) {
|
134
|
+
const config = this.client.getConfig();
|
135
|
+
const categoryId = rootCategoryId || config.rootCategoryId;
|
136
|
+
const response = await this.client.request(`/big-article-categories/platform-${config.platformId}-root-${categoryId}.json`);
|
137
|
+
return response.categories;
|
138
|
+
}
|
130
139
|
/**
|
131
140
|
* 3. 获取文章标签列表
|
132
141
|
*/
|
@@ -2564,6 +2573,12 @@ class GT6SDK {
|
|
2564
2573
|
async getCategories_p(rootCategoryId_p) {
|
2565
2574
|
return this.articles.getCategories_p(rootCategoryId_p);
|
2566
2575
|
}
|
2576
|
+
/**
|
2577
|
+
* 2.2. 便捷方法:获取文章分类列表(使用下级平台ID)
|
2578
|
+
*/
|
2579
|
+
async getCategories_a(rootCategoryId) {
|
2580
|
+
return this.articles.getCategories_a(rootCategoryId);
|
2581
|
+
}
|
2567
2582
|
/**
|
2568
2583
|
* 3. 便捷方法:获取文章标签列表
|
2569
2584
|
*/
|