Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Checked and fixed query documentation #1971

Merged
merged 3 commits into from
Dec 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions docs/source/api/queries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ Purpose
-------

In a case when a list of transactions per account is needed, `GetAccountTransactions` query can be formed.
.. note:: This query uses pagination for query responses.

.. note:: This query uses pagination for quicker and more convenient query responses.

Request Schema
--------------
Expand Down Expand Up @@ -265,6 +266,7 @@ Purpose
-------

`GetAccountAssetTransactions` query returns all transactions associated with given account and asset.

.. note:: This query uses pagination for query responses.

Request Schema
Expand Down Expand Up @@ -358,7 +360,7 @@ Response Schema
message AccountAsset {
string asset_id = 1;
string account_id = 2;
Amount balance = 3;
string balance = 3;
}

Response Structure
Expand All @@ -370,15 +372,15 @@ Response Structure

"Asset ID", "identifier of asset used for checking the balance", "<asset_name>#<domain_id>", "jpy#japan"
"Account ID", "account which has this balance", "<account_name>@<domain_id>", "makoto@soramitsu"
"Balance", "balance of the asset", "Not less than 0", "200.20"
"Balance", "balance of the asset", "No less than 0", "200.20"

Get Account Detail
^^^^^^^^^^^^^^^^^^

Purpose
-------

To get details of the account, `GetAccountDetail` query can be used. Account details are key-value pairs, splitted into writers categories. Writers are accounts, which added the corresponding account detail. Example of such structure is:
To get details of the account, `GetAccountDetail` query can be used. Account details are key-value pairs, splitted into writers categories. Writers are accounts, that added the corresponding account detail. Example of such structure is:

.. code-block:: json

Expand Down Expand Up @@ -447,7 +449,7 @@ Response Structure
Usage Examples
--------------

Let's again consider the example of details from the beginning and see, how different variants of `GetAccountDetail` queries will change the resulting response.
Again, let's consider the example of details from the beginning and see how different variants of `GetAccountDetail` queries will change the resulting response.

.. code-block:: json

Expand Down Expand Up @@ -513,7 +515,7 @@ Now, the response will contain all details about this account, added by one spec

**account_id, key and writer are set**

Lastly, if all three field are set, result will contain details, added the specific writer and under the specific key, for example, if we asked for key "age" and writer "account@a_domain", we would get:
Finally, if all three field are set, result will contain details, added the specific writer and under the specific key, for example, if we asked for key "age" and writer "account@a_domain", we would get:

.. code-block:: json

Expand All @@ -529,7 +531,7 @@ Get Asset Info
Purpose
-------

In order to know precision for given asset, and other related info in the future, such as a description of the asset, etc. user can send `GetAssetInfo` query.
In order to get information on the given asset (as for now - its precision), user can send `GetAssetInfo` query.

Request Schema
--------------
Expand Down Expand Up @@ -572,7 +574,7 @@ Response Structure
:header: "Field", "Description", "Constraint", "Example"
:widths: 15, 30, 20, 15

"Asset ID", "identifier of asset used for checking the balance", "<asset_name>#<domain_id>", "jpy"
"Asset ID", "identifier of asset used for checking the balance", "<asset_name>#<domain_id>", "jpy#japan"
"Domain ID", "domain related to this asset", "RFC1035 [#f1]_, RFC1123 [#f2]_", "japan"
"Precision", "number of digits after comma", "0 <= precision <= 255", "2"

Expand Down