From 76649b852b880eeb9bf7928923bec8ec6c085055 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 9 Jun 2019 14:33:25 +0200 Subject: [PATCH] Update docs --- .gitlab-ci.yml | 25 ++++++++++++++++++++----- README.md | 6 +++--- lib/src/Client.dart | 2 +- lib/src/Event.dart | 1 + lib/src/Room.dart | 2 +- lib/src/Store.dart | 4 ++-- lib/src/utils/ChatTime.dart | 1 + lib/src/utils/MxContent.dart | 1 + 8 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ece140..4862abe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,18 +1,33 @@ image: cirrusci/flutter stages: -- coverage + - coverage + - docs variables: LC_ALL: "en_US.UTF-8" LANG: "en_US.UTF-8" coverage: + image: cirrusci/flutter stage: coverage coverage: '/^\s+lines.+: (\d+.\d*%)/' dependencies: [] script: - - sudo apt-get update -qq && sudo apt-get install -qq apt-transport-https curl gnupg lcov git - - ./scripts/test.sh - - ./scripts/coverage.sh - - flutter pub pub publish --dry-run \ No newline at end of file + - sudo apt-get update -qq && sudo apt-get install -qq apt-transport-https curl gnupg lcov git + - ./scripts/test.sh + - ./scripts/coverage.sh + - flutter pub pub publish --dry-run + +docs: + stage: docs + scripts: + - image: cirrusci/flutter + script: + - dartdoc + - image: ruby:2.3 + script: + - cd docs/api/ && bundle exec jekyll build -d test + - cd docs/api/ && bundle exec jekyll build -d public + only: + - master \ No newline at end of file diff --git a/README.md b/README.md index 213c692..f0045df 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Matrix SDK for the famedly talk app written in dart. 1. Import the sdk ```yaml - fluffyfluttermatrix: + famedlysdk: git: url: https://gitlab.com/famedly/famedlysdk.git ref: 77be6102f6cbb2e01adc28f9caa3aa583f914235 @@ -49,7 +49,7 @@ final loginResp = await matrix.jsonRequest( "type": "m.login.password", "user": _usernameController.text, "password": _passwordController.text, - "initial_device_display_name": "Fluffy Matrix Client" + "initial_device_display_name": "famedly talk" } ); @@ -57,7 +57,7 @@ matrix.connect( newToken: loginResp["token"], newUserID: loginResp["user_id"], newHomeserver: matrix.homeserver, - newDeviceName: "Fluffy Matrix Client", + newDeviceName: "famedly talk", newDeviceID: loginResp["device_id"], newMatrixVersions: ["r0.4.0"], newLazyLoadMembers: false diff --git a/lib/src/Client.dart b/lib/src/Client.dart index ab97c04..ccd6607 100644 --- a/lib/src/Client.dart +++ b/lib/src/Client.dart @@ -27,7 +27,7 @@ import 'responses/ErrorResponse.dart'; import 'Connection.dart'; import 'Store.dart'; -/// Represents a Matrix connection to communicate with a +/// Represents a Matrix client to communicate with a /// [Matrix](https://matrix.org) homeserver and is the entry point for this /// SDK. class Client { diff --git a/lib/src/Event.dart b/lib/src/Event.dart index 0e277a2..cd0401f 100644 --- a/lib/src/Event.dart +++ b/lib/src/Event.dart @@ -26,6 +26,7 @@ import 'package:famedlysdk/src/utils/ChatTime.dart'; import 'package:famedlysdk/src/Client.dart'; import './User.dart'; +/// A single Matrix event, e.g. a message in a chat. class Event { final String id; final String roomID; diff --git a/lib/src/Room.dart b/lib/src/Room.dart index 831e76c..191cd8d 100644 --- a/lib/src/Room.dart +++ b/lib/src/Room.dart @@ -28,7 +28,7 @@ import 'package:famedlysdk/src/responses/ErrorResponse.dart'; import 'package:famedlysdk/src/Event.dart'; import './User.dart'; -/// FIXME use actual Matrix Stuff. This is a placeholder +/// Represents a Matrix room. class Room { final String roomID; String name; diff --git a/lib/src/Store.dart b/lib/src/Store.dart index bee8c74..79baec2 100644 --- a/lib/src/Store.dart +++ b/lib/src/Store.dart @@ -33,8 +33,8 @@ import 'User.dart'; import 'Room.dart'; import 'Connection.dart'; -/// Represents a Matrix connection to communicate with a -/// [Matrix](https://matrix.org) homeserver. +/// Responsible to store all data persistent and to query objects from the +/// database. class Store { final Client client; diff --git a/lib/src/utils/ChatTime.dart b/lib/src/utils/ChatTime.dart index d51840b..b3c3c37 100644 --- a/lib/src/utils/ChatTime.dart +++ b/lib/src/utils/ChatTime.dart @@ -25,6 +25,7 @@ import 'package:intl/intl.dart'; +/// Used to localize and present time in a chat application manner. class ChatTime { DateTime dateTime = DateTime.now(); diff --git a/lib/src/utils/MxContent.dart b/lib/src/utils/MxContent.dart index 6d52123..441ed12 100644 --- a/lib/src/utils/MxContent.dart +++ b/lib/src/utils/MxContent.dart @@ -24,6 +24,7 @@ import 'package:famedlysdk/src/Client.dart'; import 'dart:core'; +/// A file in Matrix presented by a mxc:// uri scheme. class MxContent { final String _mxc;