Merge pull request #2825 from tequdev/ja-versions

[JA] translate version rpcs
This commit is contained in:
Rome Reginelli
2024-11-05 11:26:32 -08:00
committed by GitHub
3 changed files with 235 additions and 2 deletions

View File

@@ -0,0 +1,111 @@
---
seo:
description: APIバージョン情報を取得します。
labels:
- コアサーバ
---
# version
[[ソース]](https://github.com/XRPLF/clio/blob/develop/src/rpc/handlers/VersionHandler.hpp "ソース")
`version`コマンドは、[Clioサーバ](../../../../concepts/networks-and-servers/the-clio-server.md)のAPIバージョン情報を取得します。`rippled`サーバーの場合は、代わりに[`version` (`rippled`)](../server-info-methods/version.md)をご覧ください。{% badge href="https://github.com/XRPLF/clio/releases/tag/1.0.0" %}新規: Clio v2.0.0{% /badge %}
## リクエストのフォーマット
リクエストフォーマットの例:
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"command": "version"
}
```
{% /tab %}
{% tab label="JSON-RPC" %}
```json
{
"method": "version",
"params": [
{}
]
}
```
{% /tab %}
{% /tabs %}
<!-- [Try it! >](websocket-api-tool.html#version) -->
リクエストはパラメーターを必要としません。
## レスポンスのフォーマット
成功したレスポンスの例:
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"result": {
"version": {
"first": 1,
"last": 2,
"good": 1
}
},
"status": "success",
"type": "response",
"warnings": [
{
"id": 2001,
"message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request"
}
]
}
```
{% /tab %}
{% tab label="JSON-RPC" %}
```json
200 OK
{
"result": {
"version": {
"first": 1,
"last": 2,
"good": 1
}
},
"status": "success",
"type": "response",
"warnings": [
{
"id":2001,
"message":"This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request"
}
]
}
```
{% /tab %}
{% /tabs %}
レスポンスは[標準フォーマット][]に従い、成功した結果は`info`オブジェクトのみを含むものとなります。
`version`オブジェクトは、次のフィールドのいずれかを返します。
| フィールド | 型 | 説明 |
|:-----------|:-------|:------------------------------|
| `first` | 文字列 | サポートされる最低のAPIリリース |
| `last` | 文字列 | サポートされる最高のAPIリリース |
| `good` | 文字列 | 指定されていない場合のデフォルトのAPI |
## 考えられるエラー
* [汎用エラータイプ][]のいずれか。
{% raw-partial file="/docs/_snippets/common-links.md" /%}

View File

@@ -0,0 +1,124 @@
---
seo:
description: APIバージョン情報を取得します。
labels:
- コアサーバ
---
# version
[[ソース]](https://github.com/XRPLF/rippled/blob/develop/src/ripple/beast/core/SemanticVersion.cpp "ソース")
`version`コマンドは、rippledサーバーのAPIバージョン情報を取得します。`Clio`サーバーの場合は、代わりに[`version` (`clio`)](../clio-methods/version.md)をご覧ください。
## リクエストのフォーマット
リクエストフォーマットの例:
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"command": "version"
}
```
{% /tab %}
{% tab label="JSON-RPC" %}
```json
{
"method": "version",
"params": [
{}
]
}
```
{% /tab %}
{% tab label="コマンドライン" %}
```sh
#Syntax: version
rippled version
```
{% /tab %}
{% /tabs %}
[試してみる >](/resources/dev-tools/websocket-api-tool#version)
リクエストはパラメーターを必要としません。
## レスポンスのフォーマット
成功したレスポンスの例:
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"result": {
"version": {
"first": "1.0.0",
"good": "1.0.0",
"last": "1.0.0"
}
},
"status": "success",
"type": "response"
}
```
{% /tab %}
{% tab label="JSON-RPC" %}
```json
200 OK
{
"result": {
"version": {
"first": "1.0.0",
"good": "1.0.0",
"last": "1.0.0"
}
},
"status": "success",
"type": "response"
}
```
{% /tab %}
{% tab label="コマンドライン" %}
```json
{
"result": {
"version": {
"first": "1.0.0",
"good": "1.0.0",
"last": "1.0.0"
}
},
"status": "success",
"type": "response"
}
```
{% /tab %}
{% /tabs %}
レスポンスは[標準フォーマット][]に従い、成功した結果は`version`オブジェクトのみを含むものとなります。
`version`オブジェクトは、次のフィールドのいずれかを返します。
| フィールド | 型 | 説明 |
|:-----------|:-------|:------------------------------|
| `first` | 文字列 | サポートされる最低のAPIリリース |
| `last` | 文字列 | サポートされる最高のAPIリリース |
| `good` | 文字列 | 指定されていない場合のデフォルトのAPI |
### 考えられるエラー
* [汎用エラータイプ][]のいずれか。
{% raw-partial file="/docs/_snippets/common-links.md" /%}

View File

@@ -74,8 +74,6 @@ An example of a successful response:
```json ```json
200 OK 200 OK
Headers
{ {
"result": { "result": {
"version": { "version": {