Description
This skill searches for products on the Codrop shipping platform by sending a keyword to the product search API. It requires an authentication token to access the API.
Usage
To use this skill, run the following command with the required parameters.
CODEBLOCK0
Parameters
- -
--keyword=<search_term>: (Required) The product keyword you want to search for (e.g., shoes). - INLINECODE2 : (Required) Your authentication token for the Codrop API.
Example
This example searches for products with the keyword "shoes".
CODEBLOCK1
Output
- - On Success: If the request is successful, the output will be a JSON object containing the product data.
- On Failure: If the request fails, an error message will be displayed. Common errors include:
- Missing
keyword or
token.
- Invalid authentication token (e.g.,
API Error: Please log in first).
- The server returns a non-JSON response.
描述
该技能通过向产品搜索API发送关键词,在Codrop发货平台上搜索产品。需要认证令牌才能访问API。
使用方法
要使用该技能,请使用所需参数运行以下命令。
bash
skill codropshiping-product-search --keyword=<搜索词> --token=<你的认证令牌>
参数
- - --keyword=<搜索词>:(必填) 要搜索的产品关键词(例如:shoes)。
- --token=<你的认证令牌>:(必填) 用于Codrop API的认证令牌。
示例
以下示例搜索关键词为shoes的产品。
bash
skill codropshiping-product-search --keyword=shoes --token=12345abcdef
输出结果
- - 成功时:如果请求成功,输出将是一个包含产品数据的JSON对象。
- 失败时:如果请求失败,将显示错误信息。常见错误包括:
- 缺少keyword或token参数。
- 无效的认证令牌(例如:API错误:请先登录)。
- 服务器返回非JSON响应。