Commit ec3911d
committed
refactor(toolset): enhance list and listAll methods with flexible parameter support
Update the ToolSet class to provide more flexible parameter handling for list and listAll methods, allowing both legacy and new parameter formats. Also improve API logging with correct request ID header and add example usage in the example file.
The changes include:
- Refactoring static list and listAll methods to accept parameters in multiple formats
- Using listAllResourcesFunction for pagination logic
- Updating API logging to use correct x-acs-request-id header
- Adding example usage in toolset.ts example file
重构(toolset): 使用灵活的参数支持增强 list 和 listAll 方法
更新 ToolSet 类以提供更灵活的参数处理,支持 list 和 listAll 方法的多种参数格式。同时改进 API 日志记录以使用正确的请求 ID 头部,并在示例文件中添加示例用法。
变更包括:
- 重构静态 list 和 listAll 方法以接受多种格式的参数
- 使用 listAllResourcesFunction 进行分页逻辑
- 更新 API 日志以使用正确的 x-acs-request-id 头部
- 在 toolset.ts 示例文件中添加示例用法
Change-Id: I5eb3398fd0120c3674a8c23d81551fdd7c326924
Signed-off-by: OhYee <oyohyee@oyohyee.com>1 parent bcc63f7 commit ec3911d
2 files changed
+65
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 82 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
106 | 101 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
110 | 106 | | |
111 | 107 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
120 | 113 | | |
121 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
122 | 146 | | |
123 | 147 | | |
124 | 148 | | |
| |||
0 commit comments