Skip to content
Snippets Groups Projects
Verified Commit 7ea25cd0 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: doc

parent 3162a6fa
No related branches found
No related tags found
No related merge requests found
import {RestAPI} from '@schukai/monster/source/data/datasource/server/restapi.mjs';
const ds = new RestAPI({
write: {
url: 'https://httpbin.org/get'
},
read: {
url: 'https://httpbin.org/get'
}
});
ds.set({flag: true})
ds.write().then(() => console.log('done'));
ds.read().then(() => console.log('done'));
\ No newline at end of file
import {RestAPI} from '@schukai/monster/source/data/datasource/restapi.mjs'; import {WebConnect} from '@schukai/monster/source/data/datasource/server/webconnect.mjs';
const ds = new RestAPI({ const ds = new WebConnect({
url: 'https://httpbin.org/get' url: 'https://httpbin.org/get'
}, {
url: 'https://httpbin.org/post'
}); });
ds.set({flag: true}) ds.set({flag: true})
......
import {WebConnect} from '@schukai/monster/source/net/webconnect.mjs';
const connection = new WebConnect({
url: 'https://httpbin.org/get'
});
connection.connect().then(()=>{
connection.send({message:"Hello World!"}).then((response)=>{
console.log(response);
});
const message = connection.poll()
})
...@@ -17,7 +17,7 @@ export {RestAPI} ...@@ -17,7 +17,7 @@ export {RestAPI}
/** /**
* The RestAPI is a class that enables a REST API server. * The RestAPI is a class that enables a REST API server.
* *
* @externalExample ../../../example/data/storage/restapi.mjs * @externalExample ../../../../example/data/datasource/server/restapi.mjs
* @license AGPLv3 * @license AGPLv3
* @since 1.22.0 * @since 1.22.0
* @copyright schukai GmbH * @copyright schukai GmbH
......
...@@ -26,7 +26,7 @@ const webConnectSymbol = Symbol("connection"); ...@@ -26,7 +26,7 @@ const webConnectSymbol = Symbol("connection");
/** /**
* The RestAPI is a class that enables a REST API server. * The RestAPI is a class that enables a REST API server.
* *
* @externalExample ../../../example/data/storage/restapi.mjs * @externalExample ../../../../example/data/datasource/server/webconnect.mjs
* @license AGPLv3 * @license AGPLv3
* @since 3.1.0 * @since 3.1.0
* @copyright schukai GmbH * @copyright schukai GmbH
......
...@@ -158,18 +158,18 @@ function connectServer(resolve, reject) { ...@@ -158,18 +158,18 @@ function connectServer(resolve, reject) {
/** /**
* The RestAPI is a class that enables a REST API server. * The RestAPI is a class that enables a REST API server.
* *
* @externalExample ../../../example/data/storage/restapi.mjs * @externalExample ../../example/net/webconnect.mjs
* @license AGPLv3 * @license AGPLv3
* @since 3.1.0 * @since 3.1.0
* @copyright schukai GmbH * @copyright schukai GmbH
* @memberOf Monster.Data.Datasource * @memberOf Monster.Net
* @summary The LocalStorage class encapsulates the access to data objects. * @summary The LocalStorage class encapsulates the access to data objects.
*/ */
class WebConnect extends BaseWithOptions { class WebConnect extends BaseWithOptions {
/** /**
* *
* @param {Object} [options] options contains definitions for the datasource. * @param {Object} [options] options contains definitions for the webconnect.
*/ */
constructor(options) { constructor(options) {
......
...@@ -14,6 +14,12 @@ const dataSymbol = Symbol("@@data"); ...@@ -14,6 +14,12 @@ const dataSymbol = Symbol("@@data");
/** /**
* This class represents a WebSocket message. * This class represents a WebSocket message.
*
* @license AGPLv3
* @since 3.4.0
* @copyright schukai GmbH
* @memberOf Monster.Net.WebSocket
* @summary The Message class encapsulates a WebSocket message.
*/ */
class Message extends Base { class Message extends Base {
......
/**
* Copyright 2022 schukai GmbH
* SPDX-License-Identifier: AGPL-3.0
*/
/**
* In this namespace you will find classes and methods for handling data.
*
* @namespace Monster.Net.WebConnect
* @memberOf Monster.Net
* @author schukai GmbH
*/
const ns = {};
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment