Skip to content

Commit e2551ca

Browse files
authored
bugfix: incorrect indexer docs (#476)
1 parent 321a02d commit e2551ca

File tree

2 files changed

+59
-47
lines changed

2 files changed

+59
-47
lines changed

algosdk/v2client/indexer.py

Lines changed: 59 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,26 @@ def accounts(
123123
max_balance (int, optional): results should have an amount less
124124
than this value (results with an amount equal to this value
125125
are excluded)
126-
block (int, optional): include results for the specified round;
127-
for performance reasons, this parameter may be disabled on
128-
some configurations
126+
block (int, optional): this is a synonym for round_num. Do not
127+
include both.
129128
auth_addr (str, optional): Include accounts configured to use
130129
this spending key.
131130
application_id (int, optional): results should filter on this
132131
application
133-
round_num (int, optional): alias for block; only specify one of
134-
these
132+
round_num (int, optional): Include results for the specified round.
133+
For performance reasons, this parameter may be disabled on some configurations.
134+
Using application-id or asset-id filters will return both creator and opt-in accounts.
135+
Filtering by include-all will return creator and opt-in accounts for deleted assets and accounts.
136+
Non-opt-in managers are not included in the results when asset-id is used.
137+
If specified, do not include block
135138
include_all (bool, optional): include all items including closed
136139
accounts, deleted applications, destroyed assets, opted-out
137140
asset holdings, and closed-out application localstates. Defaults
138141
to false.
142+
exclude (str optional): Exclude additional items such as asset holdings,
143+
application local data stored for this account,
144+
asset parameters created by this account,
145+
and application parameters created by this account.
139146
"""
140147
req = "/accounts"
141148
query = dict()
@@ -186,11 +193,6 @@ def asset_balances(
186193
max_balance (int, optional): results should have an amount less
187194
than this value (results with an amount equal to this value
188195
are excluded)
189-
block (int, optional): include results for the specified round;
190-
for performance reasons, this parameter may be disabled on
191-
some configurations
192-
round_num (int, optional): alias for block; only specify one of
193-
these
194196
include_all (bool, optional): include all items including closed
195197
accounts, deleted applications, destroyed assets, opted-out
196198
asset holdings, and closed-out application localstates. Defaults
@@ -243,13 +245,16 @@ def account_info(
243245
244246
Args:
245247
address (str): account public key
246-
block (int, optional): use results from the specified round
247-
round_num (int, optional): alias for block; only specify one of
248-
these
249-
include_all (bool, optional): include all items including closed
250-
accounts, deleted applications, destroyed assets, opted-out
251-
asset holdings, and closed-out application localstates. Defaults
252-
to false.
248+
block (int, optional): this is a synonym for round_num. Do not
249+
include both.
250+
round_num (int, optional): Include results for the specified round.
251+
If specified, do not include block
252+
include_all (bool, optional): Include all items including closed accounts, deleted applications,
253+
destroyed assets, opted-out asset holdings, and closed-out application localstates.
254+
Defaults to false.
255+
exclude (str optional): Exclude additional items such as asset holdings,
256+
application local data stored for this account, asset parameters created by this account,
257+
and application parameters created by this account.
253258
"""
254259
req = "/accounts/" + address
255260
query = dict()
@@ -282,9 +287,10 @@ def lookup_account_assets(
282287
token provided by the previous results
283288
asset_id (int): include transactions for the specified
284289
asset
285-
block (int, optional): use results from the specified round
286-
round_num (int, optional): alias for block; only specify one of
287-
these
290+
block (int, optional): this is a synonym for round_num. Do not
291+
include both.
292+
round_num (int, optional): Include results for the specified round.
293+
If specified, do not include block
288294
include_all (bool, optional): include all items including closed
289295
accounts, deleted applications, destroyed assets, opted-out
290296
asset holdings, and closed-out application localstates. Defaults
@@ -325,9 +331,10 @@ def lookup_account_asset_by_creator(
325331
token provided by the previous results
326332
asset_id (int): include transactions for the specified
327333
asset
328-
block (int, optional): use results from the specified round
329-
round_num (int, optional): alias for block; only specify one of
330-
these
334+
block (int, optional): this is a synonym for round_num. Do not
335+
include both.
336+
round_num (int, optional): Include results for the specified round.
337+
If specified, do not include block
331338
include_all (bool, optional): include all items including closed
332339
accounts, deleted applications, destroyed assets, opted-out
333340
asset holdings, and closed-out application localstates. Defaults
@@ -367,9 +374,10 @@ def lookup_account_application_local_state(
367374
next_page (str, optional): the next page of results; use the next
368375
token provided by the previous results
369376
application_id (int, optional): restrict search to application index
370-
block (int, optional): use results from the specified round
371-
round_num (int, optional): alias for block; only specify one of
372-
these
377+
block (int, optional): this is a synonym for round_num. Do not
378+
include both.
379+
round_num (int, optional): Include results for the specified round.
380+
If specified, do not include block
373381
include_all (bool, optional): include all items including closed
374382
accounts, deleted applications, destroyed assets, opted-out
375383
asset holdings, and closed-out application localstates. Defaults
@@ -409,9 +417,10 @@ def lookup_account_application_by_creator(
409417
next_page (str, optional): the next page of results; use the next
410418
token provided by the previous results
411419
application_id (int, optional): restrict search to application index
412-
block (int, optional): use results from the specified round
413-
round_num (int, optional): alias for block; only specify one of
414-
these
420+
block (int, optional): this is a synonym for round_num. Do not
421+
include both.
422+
round_num (int, optional): Include results for the specified round.
423+
If specified, do not include block
415424
include_all (bool, optional): include all items including closed
416425
accounts, deleted applications, destroyed assets, opted-out
417426
asset holdings, and closed-out application localstates. Defaults
@@ -487,10 +496,10 @@ def search_transactions(
487496
specified round
488497
asset_id (int, optional): include transactions for the specified
489498
asset
490-
end_time (str, optional): include results before the given time;
491-
must be an RFC 3339 formatted string
492499
start_time (str, optional): include results after the given time;
493500
must be an RFC 3339 formatted string
501+
end_time (str, optional): include results before the given time;
502+
must be an RFC 3339 formatted string
494503
min_amount (int, optional): results should have an amount greater
495504
than this value; microalgos are the default currency unless an
496505
asset-id is provided, in which case the asset will be used
@@ -593,17 +602,18 @@ def search_transactions_by_address(
593602
sig_type (str, optional): type of signature; one of "sig", "msig",
594603
"lsig"
595604
txid (str, optional): lookup a specific transaction by ID
596-
block (int, optional): include results for the specified round
605+
block (int, optional): this is a synonym for round_num. Do not
606+
include both.
597607
min_round (int, optional): include results at or after the
598608
specified round
599609
max_round (int, optional): include results at or before the
600610
specified round
601611
asset_id (int, optional): include transactions for the specified
602612
asset
603-
end_time (str, optional): include results before the given time;
604-
must be an RFC 3339 formatted string
605613
start_time (str, optional): include results after the given time;
606614
must be an RFC 3339 formatted string
615+
end_time (str, optional): include results before the given time;
616+
must be an RFC 3339 formatted string
607617
min_amount (int, optional): results should have an amount greater
608618
than this value; microalgos are the default currency unless an
609619
asset-id is provided, in which case the asset will be used
@@ -612,8 +622,8 @@ def search_transactions_by_address(
612622
asset-id is provided, in which case the asset will be used
613623
rekey_to (bool, optional): include results which include the
614624
rekey-to field
615-
round_num (int, optional): alias for block; only specify one of
616-
these
625+
round_num (int, optional): Include results for the specified round.
626+
If specified, do not include block
617627
"""
618628
req = "/accounts/" + address + "/transactions"
619629
query = dict()
@@ -688,17 +698,18 @@ def search_asset_transactions(
688698
sig_type (str, optional): type of signature; one of "sig", "msig",
689699
"lsig"
690700
txid (str, optional): lookup a specific transaction by ID
691-
block (int, optional): include results for the specified round
701+
block (int, optional): this is a synonym for round_num. Do not
702+
include both.
692703
min_round (int, optional): include results at or after the
693704
specified round
694705
max_round (int, optional): include results at or before the
695706
specified round
696707
address (str, optional): only include transactions with this
697708
address in one of the transaction fields
698-
end_time (str, optional): include results before the given time;
699-
must be an RFC 3339 formatted string
700709
start_time (str, optional): include results after the given time;
701710
must be an RFC 3339 formatted string
711+
end_time (str, optional): include results before the given time;
712+
must be an RFC 3339 formatted string
702713
min_amount (int, optional): results should have an amount greater
703714
than this value; microalgos are the default currency unless an
704715
asset-id is provided, in which case the asset will be used
@@ -715,8 +726,8 @@ def search_asset_transactions(
715726
to true
716727
rekey_to (bool, optional): include results which include the
717728
rekey-to field
718-
round_num (int, optional): alias for block; only specify one of
719-
these
729+
round_num (int, optional): Include results for the specified round.
730+
If specified, do not include block
720731
"""
721732
req = "/assets/" + str(asset_id) + "/transactions"
722733
query = dict()
@@ -864,9 +875,11 @@ def search_applications(
864875
865876
Args:
866877
application_id (int, optional): restrict search to application index
878+
creator (str, optional): filter just assets with the given creator
879+
address
867880
round (int, optional): not supported, DO NOT USE!
868881
limit (int, optional): restrict number of results to limit
869-
next_page (string, optional): used for pagination
882+
next_page (str, optional): used for pagination
870883
round_num (int, optional): not supported, DO NOT USE!
871884
include_all (bool, optional): include all items including closed
872885
accounts, deleted applications, destroyed assets, opted-out
@@ -908,9 +921,9 @@ def application_logs(
908921
limit (int, optional): limit maximum number of results to return
909922
min_round (int, optional): only include results at or after the specified round
910923
max_round (int, optional): only include results at or before the specified round
911-
next_page (string, optional): used for pagination
912-
sender_addr (string, optional): only include transactions with this sender address
913-
txid (string, optional): only include results with this transaction ID
924+
next_page (str, optional): used for pagination
925+
sender_addr (str, optional): only include transactions with this sender address
926+
txid (str, optional): only include results with this transaction ID
914927
"""
915928
req = "/applications/{}/logs".format(application_id)
916929
query = dict()
@@ -960,7 +973,7 @@ def application_boxes(
960973
application_id (int): The ID of the application to look up.
961974
limit (int, optional): Max number of box names to return.
962975
If max is not set, or max == 0, returns all box-names up to queried indexer's `defaultBoxesLimit`.
963-
next_page (string, optional): used for pagination
976+
next_page (str, optional): used for pagination
964977
"""
965978
req = "/applications/" + str(application_id) + "/boxes"
966979
params = {}

docs/algosdk/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ algosdk
1010
constants
1111
encoding
1212
error
13-
future/index
1413
kmd
1514
logic
1615
mnemonic

0 commit comments

Comments
 (0)