* check casts (for list and map) at cast time by recreating the list/map
instead of throwing on access.
* type warnings work now slightly differently:
* when we expect nullable fields to be actually null within normal
operation you can explicitly set the tryGet type param to an
optional type and mute the warning. Otherwise it'll warn that something
is null which we expect to something else.
|
||
|---|---|---|
| example | ||
| lib | ||
| test | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| README.md | ||
| analysis_options.yaml | ||
| pubspec.yaml | ||
README.md
Matrix API Lite
This package is a dead simple data model over the client-server specification of https://matrix.org and is mostly used as a base for a more complete Matrix SDK. It doesn't contain any logic and just provides methods for all API endpoints and json parser for all objects. It is intended to be as close to the specificaton as possible so we get a 1:1 relationship with the API. More complex logic like a sync loop or a data model for rooms should be implemented in a more complete Matrix SDK.
Usage
A simple usage example:
import 'package:matrix_api_lite/src/matrix_api.dart';
void main() async {
final api = MatrixApi(homeserver: Uri.parse('https://matrix.org'));
final capabilities = await api.requestServerCapabilities();
print(capabilities.toJson());
}
Generated code
The files in lib/src/generated are generated by dart_openapi_codegen
from matrix-doc. See the README.md in dart_openapi_codegen for more information.