Update docs

This commit is contained in:
Christian Pauly 2019-06-09 14:33:25 +02:00
parent 5ad2d4b7ce
commit 76649b852b
8 changed files with 30 additions and 12 deletions

View File

@ -2,12 +2,14 @@ image: cirrusci/flutter
stages: stages:
- coverage - coverage
- docs
variables: variables:
LC_ALL: "en_US.UTF-8" LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8" LANG: "en_US.UTF-8"
coverage: coverage:
image: cirrusci/flutter
stage: coverage stage: coverage
coverage: '/^\s+lines.+: (\d+.\d*%)/' coverage: '/^\s+lines.+: (\d+.\d*%)/'
dependencies: [] dependencies: []
@ -16,3 +18,16 @@ coverage:
- ./scripts/test.sh - ./scripts/test.sh
- ./scripts/coverage.sh - ./scripts/coverage.sh
- flutter pub pub publish --dry-run - 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

View File

@ -7,7 +7,7 @@ Matrix SDK for the famedly talk app written in dart.
1. Import the sdk 1. Import the sdk
```yaml ```yaml
fluffyfluttermatrix: famedlysdk:
git: git:
url: https://gitlab.com/famedly/famedlysdk.git url: https://gitlab.com/famedly/famedlysdk.git
ref: 77be6102f6cbb2e01adc28f9caa3aa583f914235 ref: 77be6102f6cbb2e01adc28f9caa3aa583f914235
@ -49,7 +49,7 @@ final loginResp = await matrix.jsonRequest(
"type": "m.login.password", "type": "m.login.password",
"user": _usernameController.text, "user": _usernameController.text,
"password": _passwordController.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"], newToken: loginResp["token"],
newUserID: loginResp["user_id"], newUserID: loginResp["user_id"],
newHomeserver: matrix.homeserver, newHomeserver: matrix.homeserver,
newDeviceName: "Fluffy Matrix Client", newDeviceName: "famedly talk",
newDeviceID: loginResp["device_id"], newDeviceID: loginResp["device_id"],
newMatrixVersions: ["r0.4.0"], newMatrixVersions: ["r0.4.0"],
newLazyLoadMembers: false newLazyLoadMembers: false

View File

@ -27,7 +27,7 @@ import 'responses/ErrorResponse.dart';
import 'Connection.dart'; import 'Connection.dart';
import 'Store.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 /// [Matrix](https://matrix.org) homeserver and is the entry point for this
/// SDK. /// SDK.
class Client { class Client {

View File

@ -26,6 +26,7 @@ import 'package:famedlysdk/src/utils/ChatTime.dart';
import 'package:famedlysdk/src/Client.dart'; import 'package:famedlysdk/src/Client.dart';
import './User.dart'; import './User.dart';
/// A single Matrix event, e.g. a message in a chat.
class Event { class Event {
final String id; final String id;
final String roomID; final String roomID;

View File

@ -28,7 +28,7 @@ import 'package:famedlysdk/src/responses/ErrorResponse.dart';
import 'package:famedlysdk/src/Event.dart'; import 'package:famedlysdk/src/Event.dart';
import './User.dart'; import './User.dart';
/// FIXME use actual Matrix Stuff. This is a placeholder /// Represents a Matrix room.
class Room { class Room {
final String roomID; final String roomID;
String name; String name;

View File

@ -33,8 +33,8 @@ import 'User.dart';
import 'Room.dart'; import 'Room.dart';
import 'Connection.dart'; import 'Connection.dart';
/// Represents a Matrix connection to communicate with a /// Responsible to store all data persistent and to query objects from the
/// [Matrix](https://matrix.org) homeserver. /// database.
class Store { class Store {
final Client client; final Client client;

View File

@ -25,6 +25,7 @@
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
/// Used to localize and present time in a chat application manner.
class ChatTime { class ChatTime {
DateTime dateTime = DateTime.now(); DateTime dateTime = DateTime.now();

View File

@ -24,6 +24,7 @@
import 'package:famedlysdk/src/Client.dart'; import 'package:famedlysdk/src/Client.dart';
import 'dart:core'; import 'dart:core';
/// A file in Matrix presented by a mxc:// uri scheme.
class MxContent { class MxContent {
final String _mxc; final String _mxc;