lum/lum-json-rpc

Lum JSON-RPC implementation

v2.0.0 2021-12-15 23:52 UTC

This package is auto-updated.

Last update: 2024-04-16 04:31:35 UTC


README

Summary

JSON-RPC Client and Server libraries.

Classes

Client Classes

Class Description
Lum\JSON\RPC\Client The JSON-RPC client class.
Lum\JSON\RPC\Client\Response A response from a client request.
Lum\JSON\RPC\Client\Transport Transport interface.
Lum\JSON\RPC\Client\HTTP HTTP Transport class (default transport).
Lum\JSON\RPC\Client\Curl Curl Transport class (requires Lum\Curl).

Server Classes

Class Description
Lum\JSON\RPC\Server A trait for JSON-RPC servers.
Lum\JSON\RPC\Server\Error A class representing an error response.
Lum\JSON\RPC\Server\Response A class representing a successful response.

Exception Classes

A few custom exceptions may be thrown from both the client and server.

Class Description
Lum\JSON\RPC\Exception\Exception Base class for exceptions.
Lum\JSON\RPC\Exception\InternalError Internal error occurred.
Lum\JSON\RPC\Exception\InvalidParams Parameters were invalid.
Lum\JSON\RPC\Exception\InvalidRequest Request was not valid.
Lum\JSON\RPC\Exception\InvalidResponse Response was not valid.
Lum\JSON\RPC\Exception\MethodNotFound No such method.
Lum\JSON\RPC\Exception\ParseError Could not parse JSON.

Tests

Run composer test to test the libraries.

Official URLs

This library can be found in two places:

Author

Timothy Totten

License

MIT