Skip to content

Commit 455782c

Browse files
authored
Merge pull request #8 from aliyun/feat/code-auto-completion
Feat/code auto completion
2 parents 9bf9326 + fc0faa5 commit 455782c

File tree

13 files changed

+703
-53
lines changed

13 files changed

+703
-53
lines changed

README.md

Lines changed: 62 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,68 +3,99 @@
33
[![Version](https://img.shields.io/visual-studio-marketplace/v/alibabacloud-openapi.vscode-alicloud-api)](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.vscode-alicloud-api)
44
[![Installs](https://img.shields.io/visual-studio-marketplace/i/alibabacloud-openapi.vscode-alicloud-api)](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.vscode-alicloud-api)
55
[![Ratings](https://img.shields.io/visual-studio-marketplace/r/alibabacloud-openapi.vscode-alicloud-api)](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.vscode-alicloud-api)
6-
![beta](https://img.shields.io/badge/beta-version)
76

8-
Alibaba Cloud API Toolkit 是一个轻量化的阿里云 API 工具,支持在 VS Code 中快速查阅阿里云产品的 API.
7+
The Alibaba Cloud API Toolkit for VSCode makes it easier to access Alibaba Cloud services.
98

10-
简体中文 | [English](./README.en-US.md)
9+
## Features
10+
* **Alicloud Product Subscription:** You can search for Alicloud products and subscribe to its APIs you want to use.
1111

12-
## 功能
12+
* **API Searching:** You can search the Open API of Alibaba Cloud products to which you are subscribed.
1313

14-
* **阿里云产品订阅:** 插件提供了一键订阅阿里云产品的功能,你可以通过 `ctrl+cmd+k` 搜索和订阅阿里云产品。
14+
* **API Document View:** Clicking on an API can navigate you to a new tab which displays the corresponding API document,
15+
including descriptions, request parameters, response parameters and error codes.
1516

16-
* **API 搜索:** 你可以通过 `ctrl+cmd+l` 搜索并查看已订阅的 API 文档。
17-
18-
* **API 文档预览:** 点击 API 可以打开一个新的标签页,并显示对应的 API 文档,包括描述、请求参数、响应参数和错误码。在文档中点击调试按钮,可以链接到阿里云 OpenAPI 门户进行在线 API 试用。
19-
20-
* **API 调试:** 你可以在插件中使用表单的方式调试阿里云 API,并查看结果。
17+
* **Call the API:** You can use the form to call the Alibaba Cloud API and see the response.
2118

22-
* **SDK 代码示例:** 你可以在插件中获得 SDK 代码示例,并在编辑器中快速打开对应的 SDK 代码。
19+
* **SDK Code Sample:** You can get the SDK code samples and quickly open the corresponding SDK code in VS Code.
2320

24-
* 更多功能正在开发中,敬请期待...
21+
* **Code Snippets:** You can use the code snippets to quickly generate the code.
2522

26-
## 插件 UI 导览
23+
* More features are under development, please stay tuned.
2724

28-
![VSCode Extension Guide](https://img.alicdn.com/imgextra/i1/O1CN01o9s4TT1GTq3oggW7K_!!6000000000624-0-tps-2456-1446.jpg)
25+
## Extension UI Guide
2926

30-
* 产品搜索 `ctrl+cmd+k`
27+
![VSCode Extension Guide](https://img.alicdn.com/imgextra/i1/O1CN01rOmqbK1pOoGtdWxFO_!!6000000005351-0-tps-2462-1440.jpg)
3128

29+
### Product Searching `ctrl+cmd+k`
30+
3231
![Product Searching](https://img.alicdn.com/imgextra/i1/O1CN01bcJ5DM1RpmnlOjDHK_!!6000000002161-0-tps-1202-798.jpg)
33-
34-
* API 搜索 `ctrl+cmd+l`
32+
33+
### API Searching `ctrl+cmd+l`
3534

3635
![API Serching](https://img.alicdn.com/imgextra/i1/O1CN01KaWkBF1UfCUkY0N3v_!!6000000002544-0-tps-1286-518.jpg)
3736

38-
* API 调试
39-
40-
调试功能需要配置你的 AK/SK 信息,配置方法如下:
41-
1. 安装 [Alibaba Cloud CLI Tools](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.aliyuncli) 插件,
42-
2. 打开命令行安装 aliyun-cli `brew install aliyun-cli`
43-
3. 输入 `aliyun configure` 命令,按照提示进行配置,
44-
4. 点击 VS Code 状态栏中的阿里云图标,管理你的 profiles,
45-
5. 更多信息请参考 [Alibaba Cloud CLI Documentation](https://github.com/aliyun/aliyun-cli?tab=readme-ov-file#configure)
37+
### Call the API
38+
39+
The feature requires you to configure your AK/SK information as follows:
40+
1. Install [Alibaba Cloud CLI Tools](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.aliyuncli) extentions.
41+
2. Install [aliyun-cli](https://github.com/aliyun/aliyun-cli?tab=readme-ov-file#installation).
42+
3. You can run the `aliyun configure` command for quick configuration.
43+
```
44+
$ aliyun configure
45+
Configuring profile 'default' ...
46+
Aliyun Access Key ID [None]: <Your AccessKey ID>
47+
Aliyun Access Key Secret [None]: <Your AccessKey Secret>
48+
Default Region Id [None]: cn-hangzhou
49+
Default output format [json]: json
50+
Default Language [zh]: zh
51+
```
52+
4. Click the Alibaba Cloud icon in VS Code status bar to manage your profiles.
53+
![](https://img.alicdn.com/imgextra/i1/O1CN0144NU9N1L4G1cq89Uf_!!6000000001245-0-tps-248-46.jpg)
54+
![](https://img.alicdn.com/imgextra/i2/O1CN01btLUkc1ldEHJQ0w4S_!!6000000004841-0-tps-1206-190.jpg)
55+
5. More information please refer to the [Alibaba Cloud CLI Documentation](https://github.com/aliyun/aliyun-cli?tab=readme-ov-file#configure).
4656

4757
![API debug](https://img.alicdn.com/imgextra/i4/O1CN01F1qI7S1BunIFJPiAt_!!6000000000006-0-tps-2618-2050.jpg)
4858

49-
* SDK 示例
50-
59+
### SDK Code Sample
60+
You can generate the SDK Sample by using the debugger form and then open it in your editor.
61+
5162
![sdk demo](https://img.alicdn.com/imgextra/i1/O1CN01GVhWTl1waRdYmCn7E_!!6000000006324-0-tps-2630-2038.jpg)
5263

64+
### Code Snippets
65+
You can use the code snippets to quickly generate the code.
66+
67+
Type your subscribed API into the editor and select the API snippet you want to generate.
68+
69+
![code snippets](https://img.alicdn.com/imgextra/i3/O1CN01iKQA6u1KWMiVttyH0_!!6000000001171-1-tps-915-442.gif)
70+
Or use the keyboard shortcuts `ctrl+cmd+l` to search the API and select Insert snippets.
71+
72+
![code snippets](https://img.alicdn.com/imgextra/i3/O1CN01dmGwmX1ZyVHozyKx4_!!6000000003263-1-tps-842-468.gif)
73+
74+
## Feedback
75+
Submit bug reports and feature requests on [our Github repository](https://github.com/aliyun/alibabacloud-api-vscode-toolkit/issues)
76+
.
77+
5378
## Requirements
5479
- Need VS Code 1.75.0 or above.
5580

5681
## Release Notes
5782

83+
### 0.0.6
84+
- Surpport code snippets.
85+
86+
### 0.0.5
87+
- Added aliyun-cli installation instructions.
88+
89+
### 0.0.3
90+
- Support API calling.
91+
- Support SDK code sample.
92+
5893
### 0.0.1
5994
Initial release
6095
- Support product searching and subscription.
6196
- Support API searching.
6297
- Support API Document View.
6398

64-
### 0.0.3
65-
- Support API calling.
66-
- Support SDK code sample.
67-
6899
## License
69100

70101
See the [Apache License 2.0](./LICENSE).

README.zh_CN.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Alibaba Cloud API Toolkit
2+
3+
[![Version](https://img.shields.io/visual-studio-marketplace/v/alibabacloud-openapi.vscode-alicloud-api)](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.vscode-alicloud-api)
4+
[![Installs](https://img.shields.io/visual-studio-marketplace/i/alibabacloud-openapi.vscode-alicloud-api)](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.vscode-alicloud-api)
5+
[![Ratings](https://img.shields.io/visual-studio-marketplace/r/alibabacloud-openapi.vscode-alicloud-api)](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.vscode-alicloud-api)
6+
![beta](https://img.shields.io/badge/beta-version)
7+
8+
Alibaba Cloud API Toolkit 是一个轻量化的阿里云 API 工具,支持在 VS Code 中快速查阅阿里云产品的 API.
9+
10+
简体中文 | [English](./README.md)
11+
12+
## 功能
13+
14+
* **阿里云产品订阅:** 插件提供了一键订阅阿里云产品的功能,你可以通过 `ctrl+cmd+k` 搜索和订阅阿里云产品。
15+
16+
* **API 搜索:** 你可以通过 `ctrl+cmd+l` 搜索并查看已订阅的 API 文档。
17+
18+
* **API 文档预览:** 点击 API 可以打开一个新的标签页,并显示对应的 API 文档,包括描述、请求参数、响应参数和错误码。
19+
20+
* **API 调试:** 你可以在插件中使用表单的方式调试阿里云 API,并查看结果。
21+
22+
* **SDK 代码示例:** 你可以在插件中获得 SDK 代码示例,并在编辑器中快速打开对应的 SDK 代码。
23+
24+
* **Code Snippets:** 支持代码片段功能,帮助你快速编写 SDK 代码。
25+
26+
* 更多功能正在开发中,敬请期待...
27+
28+
## 插件 UI 导览
29+
30+
![VSCode Extension Guide](https://img.alicdn.com/imgextra/i1/O1CN01o9s4TT1GTq3oggW7K_!!6000000000624-0-tps-2456-1446.jpg)
31+
32+
### 产品搜索 `ctrl+cmd+k`
33+
34+
![Product Searching](https://img.alicdn.com/imgextra/i1/O1CN01bcJ5DM1RpmnlOjDHK_!!6000000002161-0-tps-1202-798.jpg)
35+
36+
### API 搜索 `ctrl+cmd+l`
37+
38+
![API Serching](https://img.alicdn.com/imgextra/i1/O1CN01KaWkBF1UfCUkY0N3v_!!6000000002544-0-tps-1286-518.jpg)
39+
40+
### API 调试
41+
42+
调试功能需要配置你的 AK/SK 信息,配置方法如下:
43+
1. 安装 [Alibaba Cloud CLI Tools](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.aliyuncli) 插件,
44+
2. 打开命令行安装 aliyun-cli `brew install aliyun-cli`
45+
3. 输入 `aliyun configure` 命令,按照提示进行配置,
46+
```
47+
$ aliyun configure
48+
Configuring profile 'default' ...
49+
Aliyun Access Key ID [None]: <Your AccessKey ID>
50+
Aliyun Access Key Secret [None]: <Your AccessKey Secret>
51+
Default Region Id [None]: cn-hangzhou
52+
Default output format [json]: json
53+
Default Language [zh]: zh
54+
```
55+
4. 点击 VS Code 状态栏中的阿里云图标,管理你的 profiles,
56+
![](https://img.alicdn.com/imgextra/i1/O1CN0144NU9N1L4G1cq89Uf_!!6000000001245-0-tps-248-46.jpg)
57+
![](https://img.alicdn.com/imgextra/i2/O1CN01btLUkc1ldEHJQ0w4S_!!6000000004841-0-tps-1206-190.jpg)
58+
1. 更多信息请参考 [Alibaba Cloud CLI Documentation](https://github.com/aliyun/aliyun-cli?tab=readme-ov-file#configure)
59+
60+
![API debug](https://img.alicdn.com/imgextra/i4/O1CN01F1qI7S1BunIFJPiAt_!!6000000000006-0-tps-2618-2050.jpg)
61+
62+
### SDK 示例
63+
你能够通过调试表单生成 SDK 代码示例,并在编辑器中打开对应的 SDK 代码。
64+
65+
![sdk demo](https://img.alicdn.com/imgextra/i1/O1CN01GVhWTl1waRdYmCn7E_!!6000000006324-0-tps-2630-2038.jpg)
66+
67+
### Code Snippets
68+
你能通过代码片段快速生成 SDK 代码示例。
69+
70+
在编辑器输入你已订阅的 API 即可搜索到对应 API 的代码段。
71+
72+
![code snippets](https://img.alicdn.com/imgextra/i3/O1CN01iKQA6u1KWMiVttyH0_!!6000000001171-1-tps-915-442.gif)
73+
74+
或者你也可以通过快捷键 `ctrl+cmd+l` 搜索 API,然后选择插入代码段。
75+
76+
![code snippets](https://img.alicdn.com/imgextra/i3/O1CN01dmGwmX1ZyVHozyKx4_!!6000000003263-1-tps-842-468.gif)
77+
78+
## 反馈
79+
欢迎在我们的 [Github repository](https://github.com/aliyun/alibabacloud-api-vscode-toolkit/issues) 上提交你的问题和建议。
80+
81+
## Requirements
82+
- Need VS Code 1.75.0 or above.
83+
84+
## Release Notes
85+
86+
### 0.0.6
87+
- Surpport code snippets.
88+
89+
### 0.0.5
90+
- Added aliyun-cli installation instructions.
91+
92+
### 0.0.3
93+
- Support API calling.
94+
- Support SDK code sample.
95+
96+
### 0.0.1
97+
Initial release
98+
- Support product searching and subscription.
99+
- Support API searching.
100+
- Support API Document View.
101+
102+
## License
103+
104+
See the [Apache License 2.0](./LICENSE).

package.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Alibaba Cloud API Toolkit",
44
"description": "The Alibaba Cloud API Toolkit for VSCode makes it easier to access Alibaba Cloud services.",
55
"author": "Alibaba Cloud SDK Team",
6-
"version": "0.0.4",
6+
"version": "0.0.5",
77
"private": true,
88
"publisher": "alibabacloud-openapi",
99
"license": "Apache-2.0",
@@ -20,6 +20,10 @@
2020
"main": "./dist/extension",
2121
"contributes": {
2222
"commands": [
23+
{
24+
"command": "alicloud.api.autoImport",
25+
"title": "导入依赖"
26+
},
2327
{
2428
"command": "alicloud.api.githubIssue",
2529
"title": "feedback",
@@ -59,6 +63,16 @@
5963
"icon": "$(add)",
6064
"title": "订阅更多产品"
6165
},
66+
{
67+
"command": "alicloud.api.searchProducts",
68+
"icon": "$(search)",
69+
"title": "搜索产品并订阅"
70+
},
71+
{
72+
"command": "alicloud.api.addSubscription",
73+
"icon": "$(add)",
74+
"title": "订阅产品"
75+
},
6276
{
6377
"command": "alicloud.api.removeSubscriptions",
6478
"icon": "$(notebook-delete-cell)",
@@ -163,6 +177,16 @@
163177
}
164178
],
165179
"view/item/context": [
180+
{
181+
"command": "alicloud.api.addSubscription",
182+
"when": "view == alicloudApiExplorer && viewItem == PRODUCT",
183+
"group": "inline"
184+
},
185+
{
186+
"command": "alicloud.api.searchProducts",
187+
"when": "view == alicloudApiExplorer && viewItem == alicloudProducts",
188+
"group": "inline"
189+
},
166190
{
167191
"command": "alicloud.api.addSubscriptions",
168192
"when": "view == alicloudApiExplorer && viewItem == alicloudAPISubscriptions",

resources/product.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)