mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-01-27 10:14:34 +01:00
Adds example appointment file and impreves readme
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
- `-s, --server`: API server where to send the requests. Defaults to localhost (modifiable in \_\_init\_\_.py)
|
||||
- `-p, --port` : API port where to send the requests. Defaults to 9814 (modifiable in \_\_init\_\_.py)
|
||||
- `-d, --debug`: shows debug information and stores it in pisa.log
|
||||
- `-h --help`: shows this message.
|
||||
- `-h --help`: shows a list of commands or help for a specific command.
|
||||
|
||||
#### Commands
|
||||
|
||||
@@ -47,15 +47,23 @@ The API will return a `text/plain` HTTP response code `200/OK` if the appointmen
|
||||
|
||||
#### Usage
|
||||
|
||||
python pisa-cli add_appointment [command options] appointment/path_to_appointment_file
|
||||
python pisa-cli add_appointment [command options] <appointment>/<path_to_appointment_file>
|
||||
|
||||
if -f, --file **is** specified, the the command expects a path to a json file instead of a json encoded
|
||||
if `-f, --file` **is** specified, the the command expects a path to a json file instead of a json encoded
|
||||
string as parameter.
|
||||
|
||||
#### Options:
|
||||
#### Options
|
||||
- `-f, --file path_to_json_file` loads the appointment data from the specified json file instead of command line.
|
||||
|
||||
An example of a json encoded appointment file can be found in `appointment_data.json`
|
||||
An example of a json encoded appointment file can be found in `example_appointment_data.json`
|
||||
|
||||
#### Example
|
||||
|
||||
Modify the provided `example_appointment_data.json` to make `start_time` and `end_time` match some future blocks.
|
||||
|
||||
Run:
|
||||
|
||||
`python pisa-cli.py -s 18.130.195.9 -p 9814 add_appointment -f example_appointment_data.json`
|
||||
|
||||
|
||||
### get_appointment
|
||||
@@ -96,7 +104,15 @@ This command is used to get information about an specific appointment from the P
|
||||
|
||||
#### Usage
|
||||
|
||||
python pisa-cli get_appointment appointment_locator
|
||||
python pisa-cli get_appointment <appointment_locator>
|
||||
|
||||
#### Example
|
||||
|
||||
Get the locator obtained [after adding an appointment](#example).
|
||||
|
||||
Run:
|
||||
|
||||
python pisa-cli.py -s 18.130.195.9 -p 9814 get_appointment <appointment_locator>
|
||||
|
||||
### help
|
||||
|
||||
|
||||
6
pisa-btc/apps/cli/example_appointment_data.json
Normal file
6
pisa-btc/apps/cli/example_appointment_data.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{ "tx": "010000000169543735041bf9ec8fb78dc239cf0d037b9f9ad32fcb07f0cac8400b497b1993000000006b483045022100e2d583234a6ddad4e91c40f2dfb941e34c8f3baa44c5ca45c4bd6c7b86c3b5a502200e087324dee7b506355107d593789bccce9f44bc00902b2ced2383ebe4ee53de0121035bd3a3ba5ede8b8479d0f17a8bb4229c7873eddd6ccc4c73fab66114123cdca6ffffffff01e02a734a000000001976a914a30600995cc5e707c30d472c3fbf1c397c4b787888ac00000000",
|
||||
"tx_id": "30b586f13e5b7c93be9993cf96939317977776fb609ec1246c131fad6727b02b",
|
||||
"start_time": 1568242,
|
||||
"end_time": 1568245,
|
||||
"dispute_delta": 20
|
||||
}
|
||||
Reference in New Issue
Block a user