Skip to content

Latest commit

 

History

History

README.md

tim_contact_management_api

Overview

This is a TI-Messenger REST interface. It is used by TI-Messenger-Clients to manage the invite settings of contacts. Each mxid in an active contact setting has the right to invite the user who created the contact setting.

Context

Authentication

The TI-Messenger-Client uses a Matrix-OpenID-Token from his Messenger-Service for authentication on all REST operations. The bearer token can be obtained from the homeserver. (POST /_matrix/client/r0/user/{userId}/openid/request_token).

TI-Messenger-Client ---> Messenger-Proxy ---> Homeserver

REST operations

The interface implements CRUD operations to manage the contact settings.

TI-Messenger-Client ---> Messenger-Proxy

Contact

This Dart package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.3-DRAFT
  • Build package: org.openapitools.codegen.languages.DartClientCodegen For more information, please visit https://www.gematik.de

Requirements

Dart 2.12 or later

Installation & Usage

Github

If this Dart package is published to Github, add the following dependency to your pubspec.yaml

dependencies:
  tim_contact_management_api:
    git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git

Local

To use the package in your local drive, add the following dependency to your pubspec.yaml

dependencies:
  tim_contact_management_api:
    path: /path/to/tim_contact_management_api

Tests

TODO

Getting Started

Please follow the installation procedure and then run the following:

import 'package:tim_contact_management_api/api.dart';

// TODO Configure HTTP Bearer authorization: bearerMatrixOpenIdTokenAuth
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerMatrixOpenIdTokenAuth').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerMatrixOpenIdTokenAuth').setAccessToken(yourTokenGeneratorFunction);

final api_instance = ContactsApi();
final mxid = mxid_example; // String | MXID of the contact settings owner. MUST match with the MXID resolved from the Matrix-OpenID-Token.
final contact = Contact(); // Contact | 

try {
    final result = api_instance.createContactSetting(mxid, contact);
    print(result);
} catch (e) {
    print('Exception when calling ContactsApi->createContactSetting: $e\n');
}

Documentation for API Endpoints

All URIs are relative to https://localhost/tim-contact-mgmt/v1.0.2

Class Method HTTP request Description
ContactsApi createContactSetting POST /contacts
ContactsApi deleteContactSetting DELETE /contacts/{mxid}
ContactsApi getContact GET /contacts/{mxid}
ContactsApi getContacts GET /contacts
ContactsApi updateContactSetting PUT /contacts
InfoApi getInfo GET /

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerMatrixOpenIdTokenAuth

  • Type: HTTP Bearer authentication

Author

software-development@gematik.de