From da5e0d37afc0de80de0e02b3862a5d33946b61b5 Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Thu, 11 Jul 2019 17:09:45 +0200 Subject: [PATCH] Reverted heading formats --- pisa-btc/apps/cli/README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pisa-btc/apps/cli/README.md b/pisa-btc/apps/cli/README.md index 276077b..fcd3e0e 100644 --- a/pisa-btc/apps/cli/README.md +++ b/pisa-btc/apps/cli/README.md @@ -1,26 +1,26 @@ -# pisa-cli +## pisa-cli `pisa-cli` is a command line interface to interact with the PISA server, written in Python3. -## Dependencies +### Dependencies Refer to [DEPENDENCIES.md](DEPENDENCIES.md) -## Installation +### Installation Refer to [INSTALL.md](INSTALL.md) -## Usage +### Usage python pisa-cli.py [global options] command [command options] [arguments] -### Global options +#### Global options - `-s, --server`: API server where to send the requests. Defaults to btc.pisa.watch (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 a list of commands or help for a specific command. -### Commands +#### Commands The command line interface has, currently, three commands: @@ -28,7 +28,7 @@ The command line interface has, currently, three commands: - `get_appointment`: gets json formatted data about an appointment from the PISA server. - `help`: shows a list of commands or help for a specific command. -## add_appointment +### add_appointment This command is used to register appointments to the PISA server. Appointments **must** be `json` encoded, and match the following format: @@ -52,14 +52,14 @@ This command is used to register appointments to the PISA server. Appointments * The API will return a `text/plain` HTTP response code `200/OK` if the appointment is accepted, with the locator encoded in the response text, or a `400/Bad Request` if the appointment is rejected, with the rejection reason encoded in the response text. -### Usage +#### Usage python pisa-cli add_appointment [command options] / if `-f, --file` **is** specified, then 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. **Appointment can be in three states** @@ -100,18 +100,18 @@ if `-f, --file` **is** specified, then the command expects a path to a json file -## help +### help Shows the list of commands or help about how to run a specific command. -### Usage +#### Usage python pisa-cli help or python pisa-cli help command -## Example +### Example 1. Generate a new dummy appointment. **Note:** this appointment will never be fulfilled (it will eventually expire) since it does not corresopond to a valid transaction. However it can be used to interact with the PISA API. @@ -135,6 +135,6 @@ or python pisa-cli.py get_appointment ``` -## PISA API +### PISA API If you wish to read about the underlying API, and how to write your own tool to interact with it, refer to [PISA-API.md](PISA-API.md) \ No newline at end of file