| 207 | } |
| 208 | |
| 209 | UniValue help(const JSONRPCRequest& jsonRequest) |
| 210 | { |
| 211 | if (jsonRequest.fHelp || jsonRequest.params.size() > 1) |
| 212 | throw std::runtime_error( |
| 213 | "help ( \"command\" )\n" |
| 214 | "\nList all commands, or get help for a specified command.\n" |
| 215 | "\nArguments:\n" |
| 216 | "1. \"command\" (string, optional) The command to get help on\n" |
| 217 | "\nResult:\n" |
| 218 | "\"text\" (string) The help text\n" |
| 219 | ); |
| 220 | |
| 221 | std::string strCommand; |
| 222 | if (jsonRequest.params.size() > 0) |
| 223 | strCommand = jsonRequest.params[0].get_str(); |
| 224 | |
| 225 | return tableRPC.help(strCommand, jsonRequest); |
| 226 | } |
| 227 | |
| 228 | |
| 229 | UniValue stop(const JSONRPCRequest& jsonRequest) |