列出 VRF 卡包
curl --request GET \
--url https://api.renaiss.xyz/v2/gacha/packsconst options = {method: 'GET'};
fetch('https://api.renaiss.xyz/v2/gacha/packs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.renaiss.xyz/v2/gacha/packs"
response = requests.get(url)
print(response.text){
"cardPacks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"packType": "limited",
"stage": "countdown",
"description": "<string>",
"priceInUsdt": "<string>",
"expectedValueInUsd": "<string>",
"packBannerVideoUrl": "<string>",
"gachaMachineVideoUrl": "<string>",
"gachaRippingPackAnimationVideoUrl": "<string>",
"onChainPackId": "<string>",
"vendingMachineAddress": "<string>"
}
],
"pagination": {
"total": 123,
"limit": 123,
"offset": 123,
"hasMore": true
}
}{
"code": "WRONG_REQUEST_PARAMS",
"message": "<string>"
}{
"error": "Invalid authentication credential",
"code": "API_AUTH_INVALID_CREDENTIAL"
}{
"error": "Credential is not allowed by this policy",
"code": "API_AUTH_CREDENTIAL_NOT_ALLOWED"
}{
"error": "Authentication rate limit exceeded",
"code": "API_AUTH_RATE_LIMITED"
}{
"code": "FUNCTION_ERROR",
"message": "Unable to load packs"
}卡包目录
列出卡包
浏览卡包,或按 stage 筛选。传入开发者密钥,还可看到专门向你的应用开放的卡包。
GET
/
v2
/
gacha
/
packs
列出 VRF 卡包
curl --request GET \
--url https://api.renaiss.xyz/v2/gacha/packsconst options = {method: 'GET'};
fetch('https://api.renaiss.xyz/v2/gacha/packs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.renaiss.xyz/v2/gacha/packs"
response = requests.get(url)
print(response.text){
"cardPacks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"packType": "limited",
"stage": "countdown",
"description": "<string>",
"priceInUsdt": "<string>",
"expectedValueInUsd": "<string>",
"packBannerVideoUrl": "<string>",
"gachaMachineVideoUrl": "<string>",
"gachaRippingPackAnimationVideoUrl": "<string>",
"onChainPackId": "<string>",
"vendingMachineAddress": "<string>"
}
],
"pagination": {
"total": 123,
"limit": 123,
"offset": 123,
"hasMore": true
}
}{
"code": "WRONG_REQUEST_PARAMS",
"message": "<string>"
}{
"error": "Invalid authentication credential",
"code": "API_AUTH_INVALID_CREDENTIAL"
}{
"error": "Credential is not allowed by this policy",
"code": "API_AUTH_CREDENTIAL_NOT_ALLOWED"
}{
"error": "Authentication rate limit exceeded",
"code": "API_AUTH_RATE_LIMITED"
}{
"code": "FUNCTION_ERROR",
"message": "Unable to load packs"
}请求
开发者密钥可选
响应
错误码
在下表中查找接口返回的 HTTP 状态码和响应原文。有关各接口通用的处理建议,请参阅错误码含义与处理方式。
| HTTP | 错误码 | 文本字段 | 响应文本与处理方式 |
|---|---|---|---|
400 | INVALID_SCHEMA | message | 具体校验信息随输入而变化。 |
400 | WRONG_REQUEST_PARAMS | message | Bad request - invalid parameters |
401 | API_AUTH_INVALID_CREDENTIAL | error | Invalid authentication credential开发者密钥格式错误、未知、已过期或已撤销。请核对并更换密钥。 |
403 | API_AUTH_CREDENTIAL_NOT_ALLOWED | error | Credential is not allowed by this policy省略全部凭据,或仅通过 x-builder-api-key 发送可选的开发者密钥。 |
403 | GACHA_V3_BUILDER_NOT_ACCEPTED_ON_PUBLIC_API | error | This builder checks out on its own surface, not on the public API此密钥无法用于当前 API。请联系 Renaiss,无需重试。 |
429 | API_AUTH_RATE_LIMITED | error | Authentication rate limit exceeded已达到密钥的请求频率上限。稍候再以较低频率重试。 |
500 | API_AUTH_ERROR | error | Internal server error |
500 | FUNCTION_ERROR | error | Internal server error |
500 | FUNCTION_ERROR | message | 原文可能变化,例如 Unable to load packs。 |
500 | CARD_PACKS_QUERY_FAILED | message | Failed to query card packsFailed to check card pack access |