-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from campudus/feat/SyncApi-doAsyncCall
added method `.doAsyncCall` to `SyncApi`
- Loading branch information
Showing
26 changed files
with
1,737 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,241 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Api - Documentation</title> | ||
|
||
<script src="scripts/prettify/prettify.js"></script> | ||
<script src="scripts/prettify/lang-css.js"></script> | ||
<!--[if lt IE 9]> | ||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
<link type="text/css" rel="stylesheet" href="styles/prettify.css"> | ||
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> | ||
</head> | ||
<body> | ||
|
||
<input type="checkbox" id="nav-trigger" class="nav-trigger" /> | ||
<label for="nav-trigger" class="navicon-button x"> | ||
<div class="navicon"></div> | ||
</label> | ||
|
||
<label for="nav-trigger" class="overlay"></label> | ||
|
||
<nav> | ||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Api.html">Api</a></li><li><a href="AsyncApi.html">AsyncApi</a><ul class='methods'><li data-type='method'><a href="AsyncApi.html#doCall">doCall</a></li></ul></li><li><a href="ColumnBuilder.html">ColumnBuilder</a><ul class='methods'><li data-type='method'><a href="ColumnBuilder.html#addConstraint">addConstraint</a></li><li data-type='method'><a href="ColumnBuilder.html#description">description</a></li><li data-type='method'><a href="ColumnBuilder.html#displayName">displayName</a></li><li data-type='method'><a href="ColumnBuilder.html#formatPattern">formatPattern</a></li><li data-type='method'><a href="ColumnBuilder.html#groups">groups</a></li><li data-type='method'><a href="ColumnBuilder.html#hidden">hidden</a></li><li data-type='method'><a href="ColumnBuilder.html#identifier">identifier</a></li><li data-type='method'><a href="ColumnBuilder.html#languageType">languageType</a></li><li data-type='method'><a href="ColumnBuilder.html#link">link</a></li><li data-type='method'><a href="ColumnBuilder.html#maxLength">maxLength</a></li><li data-type='method'><a href="ColumnBuilder.html#minLength">minLength</a></li><li data-type='method'><a href="ColumnBuilder.html#multilanguage">multilanguage</a></li><li data-type='method'><a href="ColumnBuilder.html#ordering">ordering</a></li><li data-type='method'><a href="ColumnBuilder.html#separator">separator</a></li><li data-type='method'><a href="ColumnBuilder.html#simpleLink">simpleLink</a></li><li data-type='method'><a href="ColumnBuilder.html#singleDirection">singleDirection</a></li><li data-type='method'><a href="ColumnBuilder.html#toDescription">toDescription</a></li><li data-type='method'><a href="ColumnBuilder.html#toDisplayName">toDisplayName</a></li><li data-type='method'><a href="ColumnBuilder.html#toName">toName</a></li><li data-type='method'><a href="ColumnBuilder.html#toOrdering">toOrdering</a></li></ul></li><li><a href="ConstraintBuilder.html">ConstraintBuilder</a><ul class='methods'><li data-type='method'><a href="ConstraintBuilder.html#.cardinality">cardinality</a></li><li data-type='method'><a href="ConstraintBuilder.html#.cardinalityManyToOne">cardinalityManyToOne</a></li><li data-type='method'><a href="ConstraintBuilder.html#.cardinalityOneToMany">cardinalityOneToMany</a></li><li data-type='method'><a href="ConstraintBuilder.html#.cardinalityOneToOne">cardinalityOneToOne</a></li><li data-type='method'><a href="ConstraintBuilder.html#.deleteCascade">deleteCascade</a></li></ul></li><li><a href="SyncApi.html">SyncApi</a><ul class='methods'><li data-type='method'><a href="SyncApi.html#createColumn">createColumn</a></li><li data-type='method'><a href="SyncApi.html#createColumns">createColumns</a></li><li data-type='method'><a href="SyncApi.html#createRow">createRow</a></li><li data-type='method'><a href="SyncApi.html#createRows">createRows</a></li><li data-type='method'><a href="SyncApi.html#createTable">createTable</a></li><li data-type='method'><a href="SyncApi.html#doCall">doCall</a></li><li data-type='method'><a href="SyncApi.html#fetchTable">fetchTable</a></li><li data-type='method'><a href="SyncApi.html#resetSchema">resetSchema</a></li></ul></li><li><a href="Table.html">Table</a><ul class='methods'><li data-type='method'><a href="Table.html#convertColumnToMultilanguage">convertColumnToMultilanguage</a></li><li data-type='method'><a href="Table.html#convertColumnToSinglelanguage">convertColumnToSinglelanguage</a></li><li data-type='method'><a href="Table.html#createColumn">createColumn</a></li><li data-type='method'><a href="Table.html#createColumns">createColumns</a></li><li data-type='method'><a href="Table.html#createRow">createRow</a></li><li data-type='method'><a href="Table.html#createRowByObj">createRowByObj</a></li><li data-type='method'><a href="Table.html#createRows">createRows</a></li><li data-type='method'><a href="Table.html#deleteColumn">deleteColumn</a></li><li data-type='method'><a href="Table.html#fetch">fetch</a></li><li data-type='method'><a href="Table.html#findColumn">findColumn</a></li><li data-type='method'><a href="Table.html#getRow">getRow</a></li><li data-type='method'><a href="Table.html#getRows">getRows</a></li></ul></li><li><a href="TableBuilder.html">TableBuilder</a><ul class='methods'><li data-type='method'><a href="TableBuilder.html#create">create</a></li><li data-type='method'><a href="TableBuilder.html#displayName">displayName</a></li><li data-type='method'><a href="TableBuilder.html#group">group</a></li><li data-type='method'><a href="TableBuilder.html#hidden">hidden</a></li></ul></li><li><a href="Tables.html">Tables</a><ul class='methods'><li data-type='method'><a href="Tables.html#fetch">fetch</a></li><li data-type='method'><a href="Tables.html#find">find</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#grudStructorizer">grudStructorizer</a></li></ul> | ||
</nav> | ||
|
||
<div id="main"> | ||
|
||
<h1 class="page-title">Api</h1> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section> | ||
|
||
<header> | ||
|
||
<h2> | ||
Api | ||
</h2> | ||
|
||
|
||
</header> | ||
|
||
<article> | ||
<div class="container-overview"> | ||
|
||
|
||
|
||
|
||
|
||
<h4 class="name" id="Api"><span class="type-signature"></span>new Api<span class="signature">(baseUrl, options)</span><span class="type-signature"></span></h4> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<dl class="details"> | ||
|
||
|
||
<dt class="tag-source">Source:</dt> | ||
<dd class="tag-source"><ul class="dummy"><li> | ||
<a href="Api.js.html">Api.js</a>, <a href="Api.js.html#line17">line 17</a> | ||
</li></ul></dd> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</dl> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h5>Parameters:</h5> | ||
|
||
|
||
<table class="params"> | ||
<thead> | ||
<tr> | ||
|
||
<th>Name</th> | ||
|
||
|
||
<th>Type</th> | ||
|
||
|
||
|
||
|
||
|
||
<th class="last">Description</th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
|
||
|
||
<tr> | ||
|
||
<td class="name"><code>baseUrl</code></td> | ||
|
||
|
||
<td class="type"> | ||
|
||
|
||
<span class="param-type">string</span> | ||
|
||
|
||
|
||
</td> | ||
|
||
|
||
|
||
|
||
|
||
<td class="description last"></td> | ||
</tr> | ||
|
||
|
||
|
||
<tr> | ||
|
||
<td class="name"><code>options</code></td> | ||
|
||
|
||
<td class="type"> | ||
|
||
|
||
<span class="param-type"><a href="global.html#ApiOptions">ApiOptions</a></span> | ||
|
||
|
||
|
||
</td> | ||
|
||
|
||
|
||
|
||
|
||
<td class="description last"></td> | ||
</tr> | ||
|
||
|
||
</tbody> | ||
</table> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</article> | ||
|
||
</section> | ||
|
||
|
||
|
||
|
||
</div> | ||
|
||
<br class="clear"> | ||
|
||
<footer> | ||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. | ||
</footer> | ||
|
||
<script>prettyPrint();</script> | ||
<script src="scripts/linenumber.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Api.js - Documentation</title> | ||
|
||
<script src="scripts/prettify/prettify.js"></script> | ||
<script src="scripts/prettify/lang-css.js"></script> | ||
<!--[if lt IE 9]> | ||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
<link type="text/css" rel="stylesheet" href="styles/prettify.css"> | ||
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> | ||
</head> | ||
<body> | ||
|
||
<input type="checkbox" id="nav-trigger" class="nav-trigger" /> | ||
<label for="nav-trigger" class="navicon-button x"> | ||
<div class="navicon"></div> | ||
</label> | ||
|
||
<label for="nav-trigger" class="overlay"></label> | ||
|
||
<nav> | ||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Api.html">Api</a></li><li><a href="AsyncApi.html">AsyncApi</a><ul class='methods'><li data-type='method'><a href="AsyncApi.html#doCall">doCall</a></li></ul></li><li><a href="ColumnBuilder.html">ColumnBuilder</a><ul class='methods'><li data-type='method'><a href="ColumnBuilder.html#addConstraint">addConstraint</a></li><li data-type='method'><a href="ColumnBuilder.html#description">description</a></li><li data-type='method'><a href="ColumnBuilder.html#displayName">displayName</a></li><li data-type='method'><a href="ColumnBuilder.html#formatPattern">formatPattern</a></li><li data-type='method'><a href="ColumnBuilder.html#groups">groups</a></li><li data-type='method'><a href="ColumnBuilder.html#hidden">hidden</a></li><li data-type='method'><a href="ColumnBuilder.html#identifier">identifier</a></li><li data-type='method'><a href="ColumnBuilder.html#languageType">languageType</a></li><li data-type='method'><a href="ColumnBuilder.html#link">link</a></li><li data-type='method'><a href="ColumnBuilder.html#maxLength">maxLength</a></li><li data-type='method'><a href="ColumnBuilder.html#minLength">minLength</a></li><li data-type='method'><a href="ColumnBuilder.html#multilanguage">multilanguage</a></li><li data-type='method'><a href="ColumnBuilder.html#ordering">ordering</a></li><li data-type='method'><a href="ColumnBuilder.html#separator">separator</a></li><li data-type='method'><a href="ColumnBuilder.html#simpleLink">simpleLink</a></li><li data-type='method'><a href="ColumnBuilder.html#singleDirection">singleDirection</a></li><li data-type='method'><a href="ColumnBuilder.html#toDescription">toDescription</a></li><li data-type='method'><a href="ColumnBuilder.html#toDisplayName">toDisplayName</a></li><li data-type='method'><a href="ColumnBuilder.html#toName">toName</a></li><li data-type='method'><a href="ColumnBuilder.html#toOrdering">toOrdering</a></li></ul></li><li><a href="ConstraintBuilder.html">ConstraintBuilder</a><ul class='methods'><li data-type='method'><a href="ConstraintBuilder.html#.cardinality">cardinality</a></li><li data-type='method'><a href="ConstraintBuilder.html#.cardinalityManyToOne">cardinalityManyToOne</a></li><li data-type='method'><a href="ConstraintBuilder.html#.cardinalityOneToMany">cardinalityOneToMany</a></li><li data-type='method'><a href="ConstraintBuilder.html#.cardinalityOneToOne">cardinalityOneToOne</a></li><li data-type='method'><a href="ConstraintBuilder.html#.deleteCascade">deleteCascade</a></li></ul></li><li><a href="SyncApi.html">SyncApi</a><ul class='methods'><li data-type='method'><a href="SyncApi.html#createColumn">createColumn</a></li><li data-type='method'><a href="SyncApi.html#createColumns">createColumns</a></li><li data-type='method'><a href="SyncApi.html#createRow">createRow</a></li><li data-type='method'><a href="SyncApi.html#createRows">createRows</a></li><li data-type='method'><a href="SyncApi.html#createTable">createTable</a></li><li data-type='method'><a href="SyncApi.html#doCall">doCall</a></li><li data-type='method'><a href="SyncApi.html#fetchTable">fetchTable</a></li><li data-type='method'><a href="SyncApi.html#resetSchema">resetSchema</a></li></ul></li><li><a href="Table.html">Table</a><ul class='methods'><li data-type='method'><a href="Table.html#convertColumnToMultilanguage">convertColumnToMultilanguage</a></li><li data-type='method'><a href="Table.html#convertColumnToSinglelanguage">convertColumnToSinglelanguage</a></li><li data-type='method'><a href="Table.html#createColumn">createColumn</a></li><li data-type='method'><a href="Table.html#createColumns">createColumns</a></li><li data-type='method'><a href="Table.html#createRow">createRow</a></li><li data-type='method'><a href="Table.html#createRowByObj">createRowByObj</a></li><li data-type='method'><a href="Table.html#createRows">createRows</a></li><li data-type='method'><a href="Table.html#deleteColumn">deleteColumn</a></li><li data-type='method'><a href="Table.html#fetch">fetch</a></li><li data-type='method'><a href="Table.html#findColumn">findColumn</a></li><li data-type='method'><a href="Table.html#getRow">getRow</a></li><li data-type='method'><a href="Table.html#getRows">getRows</a></li></ul></li><li><a href="TableBuilder.html">TableBuilder</a><ul class='methods'><li data-type='method'><a href="TableBuilder.html#create">create</a></li><li data-type='method'><a href="TableBuilder.html#displayName">displayName</a></li><li data-type='method'><a href="TableBuilder.html#group">group</a></li><li data-type='method'><a href="TableBuilder.html#hidden">hidden</a></li></ul></li><li><a href="Tables.html">Tables</a><ul class='methods'><li data-type='method'><a href="Tables.html#fetch">fetch</a></li><li data-type='method'><a href="Tables.html#find">find</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#grudStructorizer">grudStructorizer</a></li></ul> | ||
</nav> | ||
|
||
<div id="main"> | ||
|
||
<h1 class="page-title">Api.js</h1> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section> | ||
<article> | ||
<pre class="prettyprint source linenums"><code>"use strict"; | ||
|
||
const _ = require("lodash"); | ||
|
||
/** | ||
* @typedef {object} ApiOptions | ||
* @property cookies {object} | ||
*/ | ||
|
||
class Api { | ||
|
||
/** | ||
* | ||
* @param baseUrl {string} | ||
* @param options {ApiOptions} | ||
*/ | ||
constructor(baseUrl, options) { | ||
if (this.constructor === Api) { | ||
throw new Error("Abstract class 'Api' cannot be instantiated!"); | ||
} | ||
|
||
this.baseUrl = baseUrl; | ||
this.cookies = _.get(options, ["cookies"], {}); | ||
this.headers = _.get(options, ["headers"], {}); | ||
} | ||
|
||
_getRequestHeaders() { | ||
return { | ||
"Cookie": _.map(this.cookies, ({value}, name) => { | ||
return name + "=" + value || "undefined"; | ||
}).join("; "), | ||
...this.headers | ||
}; | ||
} | ||
} | ||
|
||
module.exports = Api; | ||
</code></pre> | ||
</article> | ||
</section> | ||
|
||
|
||
|
||
|
||
</div> | ||
|
||
<br class="clear"> | ||
|
||
<footer> | ||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. | ||
</footer> | ||
|
||
<script>prettyPrint();</script> | ||
<script src="scripts/linenumber.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.