documentation config changes

This commit is contained in:
Jeremy Kauffman 2017-02-27 17:36:29 -05:00
parent 41d96fec00
commit f9642018ae
4 changed files with 623 additions and 533 deletions

View file

@ -1,528 +0,0 @@
# LBRY JSON-RPC API Documentation
## abandon_name
```text
DEPRECIATED, use abandon_claim
Args:
'txid': txid of claim, string
Return:
txid
```
## blob_announce_all
```text
Announce all blobs to the DHT
Args:
None
Returns:
```
## blob_get
```text
Download and return a sd blob
Args:
sd_hash
Returns
sd blob, dict
```
## blob_list
```text
Returns all blob hashes
Args:
None
Returns:
list of blob hashes
```
## blob_reflect_all
```text
Reflects all saved blobs
Args:
None
Returns:
True
```
## block_show
```text
Get contents of a block
Args:
blockhash: hash of the block to look up
Returns:
requested block
```
## claim_abandon
```text
Abandon a name and reclaim credits from the claim
Args:
'txid': txid of claim, string
'nout': nout of claim, integer
Return:
txid : txid of resulting transaction if succesful
fee : fee paid for the transaction if succesful
```
## claim_list
```text
Get claims for a name
Args:
name: file name
txid: transaction id of a name claim transaction
Returns
list of name claims
```
## claim_list_mine
```text
List my name claims
Args:
None
Returns
list of name claims
```
## claim_new_support
```text
Support a name claim
Args:
'name': name
'claim_id': claim id of claim to support
'amount': amount to support by
Return:
txid : txid of resulting transaction if succesful
nout : nout of the resulting support claim if succesful
fee : fee paid for the transaction if succesful
```
## claim_show
```text
Resolve claim info from a LBRY uri
Args:
'name': name to look up, string, do not include lbry:// prefix
'txid': optional, if specified, look for claim with this txid
'nout': optional, if specified, look for claim with this nout
Returns:
txid, amount, value, n, height
```
## commands
```text
Return a list of available commands
Returns:
list
```
## configure_ui
```text
Configure the UI being hosted
Args, optional:
'branch': a branch name on lbryio/lbry-web-ui
'path': path to a ui folder
```
## daemon_stop
```text
Stop lbrynet-daemon
Returns:
shutdown message
```
## file_delete
```text
Delete a lbry file
Args:
'file_name': downloaded file name, string
Returns:
confirmation message
```
## file_get
```text
Get a file
Args:
'name': get file by lbry uri,
'sd_hash': get file by the hash in the name claim,
'file_name': get file by its name in the downloads folder,
Returns:
'completed': bool
'file_name': string
'key': hex string
'points_paid': float
'stopped': bool
'stream_hash': base 58 string
'stream_name': string
'suggested_file_name': string
'upload_allowed': bool
'sd_hash': string
```
## file_list
```text
List files
Args:
None
Returns:
List of files, with the following keys:
'completed': bool
'file_name': string
'key': hex string
'points_paid': float
'stopped': bool
'stream_hash': base 58 string
'stream_name': string
'suggested_file_name': string
'upload_allowed': bool
'sd_hash': string
```
## file_seed
```text
Start or stop seeding a file
Args:
'status': "start" or "stop"
'name': start file by lbry uri,
'sd_hash': start file by the hash in the name claim,
'file_name': start file by its name in the downloads folder,
Returns:
confirmation message
```
## get
```text
Download stream from a LBRY uri.
Args:
'name': name to download, string
'download_directory': optional, path to directory where file will be saved, string
'file_name': optional, a user specified name for the downloaded file
'stream_info': optional, specified stream info overrides name
'timeout': optional
'wait_for_write': optional, defaults to True. When set, waits for the file to
only start to be written before returning any results.
Returns:
'stream_hash': hex string
'path': path of download
```
## get_availability
```text
Get stream availability for a winning claim
Arg:
name (str): lbry uri
Returns:
peers per blob / total blobs
```
## get_mean_availability
```text
Get mean blob availability
Args:
None
Returns:
Mean peers for a blob
```
## get_nametrie
```text
Get the nametrie
Args:
None
Returns:
Name claim trie
```
## help
```text
Return a useful message for an API command
Args:
'command': optional, command to retrieve documentation for
Returns:
if given a command, returns documentation about that command
otherwise returns general help message
```
## peer_list
```text
Get peers for blob hash
Args:
'blob_hash': blob hash
Returns:
List of contacts
```
## publish
```text
Make a new name claim and publish associated data to lbrynet
Args:
'name': name to be claimed, string
'file_path': path to file to be associated with name, string
'bid': amount of credits to commit in this claim, float
'metadata': metadata dictionary
optional 'fee'
Returns:
'success' : True if claim was succesful , False otherwise
'reason' : if not succesful, give reason
'txid' : txid of resulting transaction if succesful
'nout' : nout of the resulting support claim if succesful
'fee' : fee paid for the claim transaction if succesful
'claimid' : claimid of the resulting transaction
```
## reflect
```text
Reflect a stream
Args:
sd_hash: sd_hash of lbry file
Returns:
True or traceback
```
## report_bug
```text
Report a bug to slack
Args:
'message': string, message to send
Returns:
True if successful
```
## resolve_name
```text
Resolve stream info from a LBRY uri
Args:
'name': name to look up, string, do not include lbry:// prefix
Returns:
metadata from name claim
```
## reveal
```text
Reveal a file or directory in file browser
Args:
'path': path to be selected in file browser
Returns:
True, opens file browser
```
## send_amount_to_address
```text
Send credits to an address
Args:
amount: the amount to send
address: the address of the recipient
Returns:
True if payment successfully scheduled
```
## settings_get
```text
Get lbrynet daemon settings
Args:
None
Returns:
'run_on_startup': bool,
'data_rate': float,
'max_key_fee': float,
'download_directory': string,
'max_upload': float, 0.0 for unlimited
'max_download': float, 0.0 for unlimited
'upload_log': bool,
'search_timeout': float,
'download_timeout': int
'max_search_results': int,
'wallet_type': string,
'delete_blobs_on_remove': bool,
'peer_port': int,
'dht_node_port': int,
'use_upnp': bool,
```
## settings_set
```text
Set lbrynet daemon settings
Args:
'run_on_startup': bool,
'data_rate': float,
'max_key_fee': float,
'download_directory': string,
'max_upload': float, 0.0 for unlimited
'max_download': float, 0.0 for unlimited
'upload_log': bool,
'download_timeout': int
Returns:
settings dict
```
## status
```text
Return daemon status
Args:
session_status: bool
blockchain_status: bool
Returns:
daemon status
```
## stream_cost_estimate
```text
Get estimated cost for a lbry stream
Args:
'name': lbry uri
'size': stream size, in bytes. if provided an sd blob won't be downloaded.
Returns:
estimated cost
```
## transaction_list
```text
List transactions
Args:
None
Returns:
list of transactions
```
## transaction_show
```text
Get a decoded transaction from a txid
Args:
txid: txid hex string
Returns:
JSON formatted transaction
```
## version
```text
Get lbry version information
Args:
None
Returns:
"platform": platform string
"os_release": os release string
"os_system": os name
"lbrynet_version: ": lbrynet_version,
"lbryum_version: ": lbryum_version,
"ui_version": commit hash of ui version being used
"remote_lbrynet": most recent lbrynet version available from github
"remote_lbryum": most recent lbryum version available from github
```
## wallet_balance
```text
Return the balance of the wallet
Returns:
balance, float
```
## wallet_is_address_mine
```text
Checks if an address is associated with the current wallet.
Args:
address: string
Returns:
is_mine: bool
```
## wallet_new_address
```text
Generate a new wallet address
Args:
None
Returns:
new wallet address, base 58 string
```
## wallet_public_key
```text
Get public key from wallet address
Args:
wallet: wallet address, base58
Returns:
public key
```

View file

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="80.207558mm"
height="58.081333mm"
viewBox="0 0 284.20001 205.8"
id="svg3479"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="lbry-white-logo-only.svg">
<defs
id="defs3481" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="-470.0429"
inkscape:cy="-5.6714247"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata3484">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-363.61433,-320.89078)">
<g
id="g3396"
transform="translate(363.61433,320.89078)">
<g
id="g3398">
<polygon
style="fill:#ffffff"
points="138.8,155.2 271,74 271,68.2 146.2,8 7,94.1 7,132.6 138.8,197.8 276.4,113.4 280.3,119.4 139.2,205.8 0,137 0,90.2 145.8,0 278,63.8 278,77.9 139.2,163.2 34.6,111.9 34.8,104 "
id="polygon3400" />
</g>
<g
id="g3402">
<polygon
style="fill:#ffffff"
points="276.5,128.5 278.5,115.9 266.3,113.8 267.1,108.9 284.2,111.8 281.4,129.3 "
id="polygon3404" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -1,3 +1,528 @@
# LBRY Documentation
# LBRY JSON-RPC API Documentation
## abandon_name
```text
DEPRECIATED, use abandon_claim
Args:
'txid': txid of claim, string
Return:
txid
```
## blob_announce_all
```text
Announce all blobs to the DHT
Args:
None
Returns:
```
## blob_get
```text
Download and return a sd blob
Args:
sd_hash
Returns
sd blob, dict
```
## blob_list
```text
Returns all blob hashes
Args:
None
Returns:
list of blob hashes
```
## blob_reflect_all
```text
Reflects all saved blobs
Args:
None
Returns:
True
```
## block_show
```text
Get contents of a block
Args:
blockhash: hash of the block to look up
Returns:
requested block
```
## claim_abandon
```text
Abandon a name and reclaim credits from the claim
Args:
'txid': txid of claim, string
'nout': nout of claim, integer
Return:
txid : txid of resulting transaction if succesful
fee : fee paid for the transaction if succesful
```
## claim_list
```text
Get claims for a name
Args:
name: file name
txid: transaction id of a name claim transaction
Returns
list of name claims
```
## claim_list_mine
```text
List my name claims
Args:
None
Returns
list of name claims
```
## claim_new_support
```text
Support a name claim
Args:
'name': name
'claim_id': claim id of claim to support
'amount': amount to support by
Return:
txid : txid of resulting transaction if succesful
nout : nout of the resulting support claim if succesful
fee : fee paid for the transaction if succesful
```
## claim_show
```text
Resolve claim info from a LBRY uri
Args:
'name': name to look up, string, do not include lbry:// prefix
'txid': optional, if specified, look for claim with this txid
'nout': optional, if specified, look for claim with this nout
Returns:
txid, amount, value, n, height
```
## commands
```text
Return a list of available commands
Returns:
list
```
## configure_ui
```text
Configure the UI being hosted
Args, optional:
'branch': a branch name on lbryio/lbry-web-ui
'path': path to a ui folder
```
## daemon_stop
```text
Stop lbrynet-daemon
Returns:
shutdown message
```
## file_delete
```text
Delete a lbry file
Args:
'file_name': downloaded file name, string
Returns:
confirmation message
```
## file_get
```text
Get a file
Args:
'name': get file by lbry uri,
'sd_hash': get file by the hash in the name claim,
'file_name': get file by its name in the downloads folder,
Returns:
'completed': bool
'file_name': string
'key': hex string
'points_paid': float
'stopped': bool
'stream_hash': base 58 string
'stream_name': string
'suggested_file_name': string
'upload_allowed': bool
'sd_hash': string
```
## file_list
```text
List files
Args:
None
Returns:
List of files, with the following keys:
'completed': bool
'file_name': string
'key': hex string
'points_paid': float
'stopped': bool
'stream_hash': base 58 string
'stream_name': string
'suggested_file_name': string
'upload_allowed': bool
'sd_hash': string
```
## file_seed
```text
Start or stop seeding a file
Args:
'status': "start" or "stop"
'name': start file by lbry uri,
'sd_hash': start file by the hash in the name claim,
'file_name': start file by its name in the downloads folder,
Returns:
confirmation message
```
## get
```text
Download stream from a LBRY uri.
Args:
'name': name to download, string
'download_directory': optional, path to directory where file will be saved, string
'file_name': optional, a user specified name for the downloaded file
'stream_info': optional, specified stream info overrides name
'timeout': optional
'wait_for_write': optional, defaults to True. When set, waits for the file to
only start to be written before returning any results.
Returns:
'stream_hash': hex string
'path': path of download
```
## get_availability
```text
Get stream availability for a winning claim
Arg:
name (str): lbry uri
Returns:
peers per blob / total blobs
```
## get_mean_availability
```text
Get mean blob availability
Args:
None
Returns:
Mean peers for a blob
```
## get_nametrie
```text
Get the nametrie
Args:
None
Returns:
Name claim trie
```
## help
```text
Return a useful message for an API command
Args:
'command': optional, command to retrieve documentation for
Returns:
if given a command, returns documentation about that command
otherwise returns general help message
```
## peer_list
```text
Get peers for blob hash
Args:
'blob_hash': blob hash
Returns:
List of contacts
```
## publish
```text
Make a new name claim and publish associated data to lbrynet
Args:
'name': name to be claimed, string
'file_path': path to file to be associated with name, string
'bid': amount of credits to commit in this claim, float
'metadata': metadata dictionary
optional 'fee'
Returns:
'success' : True if claim was succesful , False otherwise
'reason' : if not succesful, give reason
'txid' : txid of resulting transaction if succesful
'nout' : nout of the resulting support claim if succesful
'fee' : fee paid for the claim transaction if succesful
'claimid' : claimid of the resulting transaction
```
## reflect
```text
Reflect a stream
Args:
sd_hash: sd_hash of lbry file
Returns:
True or traceback
```
## report_bug
```text
Report a bug to slack
Args:
'message': string, message to send
Returns:
True if successful
```
## resolve_name
```text
Resolve stream info from a LBRY uri
Args:
'name': name to look up, string, do not include lbry:// prefix
Returns:
metadata from name claim
```
## reveal
```text
Reveal a file or directory in file browser
Args:
'path': path to be selected in file browser
Returns:
True, opens file browser
```
## send_amount_to_address
```text
Send credits to an address
Args:
amount: the amount to send
address: the address of the recipient
Returns:
True if payment successfully scheduled
```
## settings_get
```text
Get lbrynet daemon settings
Args:
None
Returns:
'run_on_startup': bool,
'data_rate': float,
'max_key_fee': float,
'download_directory': string,
'max_upload': float, 0.0 for unlimited
'max_download': float, 0.0 for unlimited
'upload_log': bool,
'search_timeout': float,
'download_timeout': int
'max_search_results': int,
'wallet_type': string,
'delete_blobs_on_remove': bool,
'peer_port': int,
'dht_node_port': int,
'use_upnp': bool,
```
## settings_set
```text
Set lbrynet daemon settings
Args:
'run_on_startup': bool,
'data_rate': float,
'max_key_fee': float,
'download_directory': string,
'max_upload': float, 0.0 for unlimited
'max_download': float, 0.0 for unlimited
'upload_log': bool,
'download_timeout': int
Returns:
settings dict
```
## status
```text
Return daemon status
Args:
session_status: bool
blockchain_status: bool
Returns:
daemon status
```
## stream_cost_estimate
```text
Get estimated cost for a lbry stream
Args:
'name': lbry uri
'size': stream size, in bytes. if provided an sd blob won't be downloaded.
Returns:
estimated cost
```
## transaction_list
```text
List transactions
Args:
None
Returns:
list of transactions
```
## transaction_show
```text
Get a decoded transaction from a txid
Args:
txid: txid hex string
Returns:
JSON formatted transaction
```
## version
```text
Get lbry version information
Args:
None
Returns:
"platform": platform string
"os_release": os release string
"os_system": os name
"lbrynet_version: ": lbrynet_version,
"lbryum_version: ": lbryum_version,
"ui_version": commit hash of ui version being used
"remote_lbrynet": most recent lbrynet version available from github
"remote_lbryum": most recent lbryum version available from github
```
## wallet_balance
```text
Return the balance of the wallet
Returns:
balance, float
```
## wallet_is_address_mine
```text
Checks if an address is associated with the current wallet.
Args:
address: string
Returns:
is_mine: bool
```
## wallet_new_address
```text
Generate a new wallet address
Args:
None
Returns:
new wallet address, base 58 string
```
## wallet_public_key
```text
Get public key from wallet address
Args:
wallet: wallet address, base58
Returns:
public key
```
## [API Documentation](/api/)

View file

@ -1,7 +1,21 @@
site_name: LBRY
repo_url: https://github.com/lbryio/lbry
pages:
- Home: index.md
- "JSON-RPC API": api.md
#theme: readthedocs
- "API": index.md
theme: material
site_dir: docs_build
google_analytics:
- 'UA-60403362-1'
- 'auto'
extra:
palette:
primary: 'teal'
accent: 'green'
logo: 'images/lbry-white.svg'
social:
- type: 'github'
link: 'https://github.com/lbryio'
- type: 'twitter'
link: 'https://twitter.com/lbryio'
- type: 'facebook'
link: 'https://facebook.com/lbryio'