@vtecx/vtecxnext 2.2.12 → 2.2.13
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/vtecxnext.d.ts +2 -2
- package/dist/vtecxnext.js +13 -2
- package/package.json +1 -1
package/dist/vtecxnext.d.ts
CHANGED
|
@@ -635,9 +635,9 @@ export declare class VtecxNext {
|
|
|
635
635
|
/**
|
|
636
636
|
* Get groups
|
|
637
637
|
* @param uri group key
|
|
638
|
-
* @return
|
|
638
|
+
* @return group array
|
|
639
639
|
*/
|
|
640
|
-
getGroups: () => Promise<
|
|
640
|
+
getGroups: () => Promise<string[] | null>;
|
|
641
641
|
/**
|
|
642
642
|
* whether you are in the group
|
|
643
643
|
* @param uri group key
|
package/dist/vtecxnext.js
CHANGED
|
@@ -2441,7 +2441,7 @@ class VtecxNext {
|
|
|
2441
2441
|
/**
|
|
2442
2442
|
* Get groups
|
|
2443
2443
|
* @param uri group key
|
|
2444
|
-
* @return
|
|
2444
|
+
* @return group array
|
|
2445
2445
|
*/
|
|
2446
2446
|
getGroups = async () => {
|
|
2447
2447
|
//console.log('[vtecxnext getGroups] start.')
|
|
@@ -2461,7 +2461,18 @@ class VtecxNext {
|
|
|
2461
2461
|
// レスポンスのエラーチェック
|
|
2462
2462
|
await checkVtecxResponse(response);
|
|
2463
2463
|
// 戻り値
|
|
2464
|
-
|
|
2464
|
+
const feed = await getJson(response);
|
|
2465
|
+
//console.log(`[vtecxnext getGroups] feed=${JSON.stringify(feed)}`)
|
|
2466
|
+
if (feed && Array.isArray(feed) && feed.length > 0) {
|
|
2467
|
+
const groups = [];
|
|
2468
|
+
for (const entry of feed) {
|
|
2469
|
+
if (entry.link && entry.link.length > 0) {
|
|
2470
|
+
groups.push(entry.link[0].___href);
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
return groups;
|
|
2474
|
+
}
|
|
2475
|
+
return null;
|
|
2465
2476
|
};
|
|
2466
2477
|
/**
|
|
2467
2478
|
* whether you are in the group
|