Skip to content

Commit c1ae404

Browse files
committed
API docs refactoring
1 parent 996f4b7 commit c1ae404

29 files changed

+12
-273
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ nosetests.xml
5353

5454
# pytest
5555
.pytest_cache
56-
node/blockchain/tests/examples/testing.json
5756

5857
# mypy
5958
.mypy_cache

node/blockchain/constants.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,3 @@
55

66
LAST_BLOCK_ID = 'last'
77
BLOCK_LOCK = 'block'
8-
9-
NODE_DETAILS_EXAMPLE = 'node_details'
10-
NODE_LIST_EXAMPLE = 'node_list'
11-
ACCOUNT_STATE_DETAILS_EXAMPLE = 'account_state_details'
12-
13-
BLOCK_DETAILS_GENESIS_EXAMPLE = 'block_details_genesis'
14-
BLOCK_DETAILS_COIN_TRANSFER_EXAMPLE = 'block_details_coin_transfer'
15-
BLOCK_DETAILS_NODE_DECLARATION_EXAMPLE = 'block_details_node_declaration'
16-
BLOCK_DETAILS_PV_SCHEDULE_UPDATE_EXAMPLE = 'block_details_pv_schedule_update'
17-
BLOCK_LIST_EXAMPLE = 'block_list'
18-
19-
SIGNED_CHANGE_REQUEST_COIN_TRANSFER_EXAMPLE = 'signed_change_request_coin_transfer'
20-
SIGNED_CHANGE_REQUEST_NODE_DECLARATION_EXAMPLE = 'signed_change_request_node_declaration'

node/blockchain/serializers/account_state.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66

77

88
class AccountStateSerializer(serializers.ModelSerializer):
9-
"""
10-
Account state, which defines a set of attributes about the current account state, such as account balance
11-
(the amount of coins owned by an account). These attributes change over time.
12-
"""
139

1410
_id = serializers.CharField()
1511
balance = serializers.IntegerField()

node/blockchain/serializers/block.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@
1111

1212

1313
class BlockSerializer(serializers.ModelSerializer):
14-
"""
15-
Block are structure that store data. These data describe changes to the network and originate
16-
from signed change requests, such as:<br>
17-
* Genesis;<br>
18-
* Transfers of coins between accounts;<br>
19-
* New nodes being added to the network;<br>
20-
* Primary Validator Schedule Updates.
21-
"""
2214

2315
signer = serializers.CharField(min_length=64, max_length=64, write_only=True)
2416
signature = serializers.CharField(min_length=128, max_length=128, write_only=True)

node/blockchain/serializers/node.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55

66
class NodeSerializer(serializers.ModelSerializer):
7-
"""
8-
The network uses multiple nodes, which are servers with several responsibilities.
9-
Nodes connect users or client apps to the network, or enable important processes,
10-
such as transaction validation.
11-
"""
127

138
# TODO(dmu) HIGH: Instead of redefining serializer fields generate serializer from
149
# Node model metadata

node/blockchain/serializers/signed_change_request.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515

1616

1717
class SignedChangeRequestSerializer(serializers.Serializer, ValidateUnknownFieldsMixin):
18-
"""
19-
Signed change request is a data update request. Next types are allowed:<br>
20-
* Transfers of coins between accounts;<br>
21-
* New nodes being added to the network.<br>
22-
"""
2318

2419
signer = serializers.CharField()
2520
signature = serializers.CharField()

node/blockchain/tests/examples.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

node/blockchain/tests/examples/account_state_details.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

node/blockchain/tests/examples/block_details_coin_transfer.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

node/blockchain/tests/examples/block_details_genesis.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)