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
#* | |
Abbreviates a String which can contain html tags. Html tags are not counted in String length. It also try to handle open tags and html entities. | |
Adopted from http://www.displaytag.org/1.2/displaytag/apidocs/org/displaytag/util/HtmlTagUtil.html | |
@param str full String. null is handled by returning null | |
@param maxLength maximum number of characters (excluding tags) | |
@param byNumberOfWords if true maxLength will be the number of words returned, elsewhere will represent the number of characters. | |
@return abbreviated String | |
*# |
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
// To install module, run: `npm i node-fetch` | |
const fetch = require("node-fetch"); | |
const AUTHENTICATION = {username: '...', password: '...'}; | |
const REST_API_URL = 'https://CASCADE_URL/api/v1/'; | |
const SITE_NAME = 'www.example.com'; | |
const DATA_DEFINITION_NAME = 'foo'; | |
const TAG_TO_PUSH = 'bar'; |