CSFloat Skill
Query CSFloat skins data directly from Clawdbot.
Setup
- 1. Get your API key: https://csfloat.com/profile, under the Developer tab
- Generate a key by pressing "New Key"
- Set environment variables:
CODEBLOCK0
Usage
All commands use curl to hit the Trello REST API. Use the API key with the "Authorization: " header.
Get all listings
CODEBLOCK1
Get specific listing
CODEBLOCK2
Create a listing
CODEBLOCK3
Creating a listing uses the following body parameters:
| Parameter | Default | Description | Optional |
|---|
| type | buynow | Either buy_now or INLINECODE1 | YES |
| assetid |
| The ID of the item to list | NO |
| price | | Either the
buy_now price or the current bid or reserve price on an
auction | NO (if
buy_now) |
| max
offerdiscount | Set in user profile |
buy_now max discount for an offer. This will override the default set in your profile. | YES |
|
reserve_price | |
auction start price | NO (if
auction) |
| duration_days | |
auction duration in days. Can be: 1, 3, 5, 7, or 14 | NO (if
auction) |
| description | | User defined description. Max characters of 180. | YES |
| private | false | If true, will hide listings from public searches | YES |
Notes
- - Asset ids are from Steam
CSFloat 技能
直接从 Clawdbot 查询 CSFloat 皮肤数据。
设置
- 1. 获取你的 API 密钥:https://csfloat.com/profile,在开发者(Developer)选项卡下
- 点击新建密钥(New Key)生成密钥
- 设置环境变量:
bash
export CSFLOAT
APIKEY=你的-api-密钥
使用方法
所有命令均使用 curl 访问 Trello REST API。使用 API 密钥时需添加Authorization: 标头。
获取所有列表
bash
curl -s https://csfloat.com/api/v1/listings --header Authorization: $CSFLOAT
APIKEY --header Content-Type: application/json | jq .data.[] | { id, item, price }
获取特定列表
bash
curl -s https://csfloat.com/api/v1/listings/$LISTING
ID --header Authorization: $CSFLOATAPI_KEY --header Content-Type: application/json
创建列表
bash
curl -X POST https://csfloat.com/api/v1/listings \
-H Authorization: $LISTING_ID; Content-Type: application/json \
-d {asset
id: 21078095468, type: buynow, price: 8900, description: 仅供展示, private: false}
创建列表时使用以下主体参数:
| 参数 | 默认值 | 描述 | 可选 |
|---|
| type | buynow | 可选 buynow 或 auction | 是 |
| asset_id |
| 要列出的物品 ID | 否 |
| price | | buy
now 价格,或 auction 的当前出价或保留价 | 否(若为 buynow) |
| max
offerdiscount | 在用户资料中设置 | buy_now 的最大报价折扣。将覆盖资料中的默认设置。 | 是 |
| reserve_price | | auction 的起始价格 | 否(若为 auction) |
| duration_days | | auction 的持续天数。可选:1、3、5、7 或 14 | 否(若为 auction) |
| description | | 用户自定义描述。最多 180 个字符。 | 是 |
| private | false | 若为 true,将隐藏列表使其不被公开搜索 | 是 |
备注