diff options
author | Matias Linares <matiaslina@gmail.com> | 2021-07-08 17:21:43 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2021-07-08 17:21:43 -0300 |
commit | e18228edfedf926f0240bcf1e84729e67aa3f297 (patch) | |
tree | 8c2b6a5fa4f0fc74b23e973806fcfa32b1f94d0c | |
parent | 6d93e48c2e9260a15746e96ec663c517d9ef26da (diff) | |
parent | 0977a6168362b4e811c66fbddb605ec44b9f1f58 (diff) | |
download | perl6-matrix-client-e18228edfedf926f0240bcf1e84729e67aa3f297.tar.gz |
Merge remote-tracking branch 'origin/master'
-rw-r--r-- | CONTRIBUTING.md | 78 | ||||
-rw-r--r-- | Changelog | 49 | ||||
-rw-r--r-- | README.md | 10 |
3 files changed, 134 insertions, 3 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e5f0590 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,78 @@ +# How to contribute to Matrix::Client + +## The Contribution Process + +For small changes, feel free to submit a pull request on Github. + +This includes: + +* Bug fixes +* Missing arguments in existing endpoints +* Implement a new endpoint + +If you need guidance or want to discuss something before working on the +code, +[open an issue](https://github.com/matiaslina/Matrix-Client/issues/new) on +Github. + +If you don't get feedback on your pull request, feel free to poke me +via email or Matrix. You can find them on the [README.md](README.md). + +## Coding style + +Please match your coding style to that of the code around it :) + +# Architecture overview + +## Matrix::Client + +This is the main class that implements all the API and must be +posible to do every action of the API from an instance of the client. + +## Matrix::Client::Room + +This class represents an instance of a single room, identified by +its `room_id`. + +The methods that this class should expose are the endpoints that have +the prefix `/_matrix/client/r0/rooms/{roomId}` from the +[Matrix client-server Specification](https://matrix.org/docs/spec/client_server/r0.6.1). + +If there's a method on `Matrix::Client::Room` but not a similar method +on `Matrix::Client`, that is considered a bug (for example: +`Matrix::Client.ban` and `Matrix::Client::Room.ban`). This is to avoid +that the user to instanciate a new `Matrix::Client::Room` and then +call the method. + +## Matrix::Client::Requester + +This role implements the http methods `GET`, `POST`, `PUT`, etc. when +interfacing with a home server. This is necesary for a couple of +reasons: + +* Correct encoding of url queryparms +* Set the correct headers +* Handle errors in a consistent manner + +The `Matrix::Client` and `Matrix::Client::Room` use this role. + +## Matrix::Client::Response + +The module `Matrix::Client::Response` have all the classes that are +used to wrap the HTTP responses from the home server. + +There's nothing to crazy here. For the most part there's some `_` to +`-` conversion for the JSON keys -> raku objects and to remove +unnecessary keys. + +## Matrix::Client::Common::TXN-ID + +This variable it's used every time there's a need for a transaction +id. + +You must increment this variable on use. A +`$Matrix::Client::Common::TXN-ID++;` is enough. + +# How do I... + +## Add a new endpoint? diff --git a/Changelog b/Changelog new file mode 100644 index 0000000..66759f8 --- /dev/null +++ b/Changelog @@ -0,0 +1,49 @@ +current +======= + +* Add read-markers API support +* Add typing api support + +v0.6.1 +====== + +* Fix “Too few positionals passed; expected 2 arguments but got 1” on + response tests. + +v0.6.0 +====== + +* Add MediaStore class that implements /_matrix/media endpoints. This class can: + - Parse MXC uris + - Download files + - Upload files + - Download/generate thumbnails + - Get the server configuration +* Add .media method for Matrix::Client +* Misc changes on the load-docs.p6 scripts that generates the endpoints.md + +v0.5.2 +====== + +* Lot of changes from Perl6 to Raku. This includes file extensions, + mentions in the code and shebang +* Fix tests that required JSON::Tiny + +v0.5.1 +====== + +* Use JSON::Fast in favor of JSON::Tiny + +v0.5.0 +====== +* Implemented list and update on device management endpoints +* Use Authorization header in favor to access token query param + +v0.4.0 +====== + +v0.3.0 +====== + +v0.2.1 +====== @@ -2,8 +2,11 @@ A [Raku](https://raku.org) library for [Matrix](https://matrix.org). -## Synopsis +## Installation + zef install Matrix::Client + +## Usage use Matrix::Client; @@ -39,9 +42,10 @@ Here's a not complete list of things that can be done: * Send messages * Upload files to a home-server - There are many missing endpoints (you can check a complete checklist [here](https://github.com/matiaslina/perl6-matrix-client/blob/master/endpoints.md)). +If you want to contribute with some endpoint check the +[CONTRIBUTING.md](CONTRIBUTING.md) file. ## Documentation @@ -50,4 +54,4 @@ includes API documentation, basic usage, examples, etc. ## Author -Matías Linares <matias@deprecated.org> | Matrix ID: `@matias:matrix.deprecated.org` +Matías Linares <matias@deprecated.org> | Matrix ID: `@matias:chat.deprecated.org` |