windwardrestapi

    21.0.24 • Public • Published

    #Windward RESTful API JavaScript

    ##Installation Use the package manager [npm] to install. Run command:

    • npm install --save windwardrestapi (to install for a local project)
    • npm install -g windwardrestapi (to install globally)

    ##Usage Please refer to the sample application to see these methods being used. Also refer to https://app.swaggerhub.com/apis/Windward-Studios/windward-rest_ful_api/2.0#/ to see the object structure and heirarchy in the client.

    import pkg from 'windwardrestapi';
    const {WindwardClient, Template, Xml_10DataSource, OutputFormatEnum} = pkg;

    ###Method and Constructor Declarations Outline of the code to get a better idea of what the methods and constructors look like in this project. ####WindwardClient Methods The Windward object constructor takes in the base url for the RESTful engine, and an optional licence key if you want to use a different key:

    constructor(baseUrl : string, licKey? :string);

    #####getVersionInfo This method returns the version information for the REST engine and the local client.

    async getVersionInfo();

    #####postDocument This method takes in a Template object and posts it to the engine for processing. Returns Document object.

    async postDocument(template : Template);

    #####getDocumentStatus This method gets the status of the document as it is being processed by the engine. Takes in a Document object Guid and returns a status code.

    async getDocumentStatus(guid: string);

    #####getDocunment This method retrieves the generated document after processing. Takes in a Document object Guid and returns a document object.

    async getDocument(guid : string);

    #####deleteDocument This method deletes a generated document. Takes in a Document object Guid and returns a status code.

    async deleteDocument(guid : string);

    #####postMetrics This method takes in a Template object and posts it to the engine to get metrics. Returns Metrics object.

    async postMetrics(template : Template);

    #####getMetricsStatus This method gets the status of the metrics as it is being processed by the engine. Takes in a Metrics object Guid and returns a status code.

    async getMetricsStatus(guid: string);

    #####getMetrics This method retrieves the generated metrics after processing. Takes in a Metrics object Guid and returns a metrics object.

    async getMetrics(guid : string);

    #####deleteMetrics This method deletes a generated metrics. Takes in a Metrics object Guid and returns a status code.

    async deleteMetrics(guid : string);

    #####postTagtree This method takes in a Template object and posts it to the engine to get the tag tree of tags in the template. Returns TagTree object.

    async postTagTree(template : Template);

    #####getTagTreeStatus This method gets the status of the tag tree as it is being processed by the engine. Takes in a TagTree object Guid and returns a status code.

    async getTagTreeStatus(guid: string);

    #####getTagTree This method retrieves the generated tag tree after processing. Takes in a TagTree object Guid and returns a Tagtree object.

    async getTagTree(guid : string);

    #####deleteTagTree This method deletes a generated tag tree. Takes in a TagTree object Guid and returns a status code.

    async deleteTagTree(guid : string);

    ####Datasource Constructors The constructors for the Datasource objects. #####Base DataSource Constructor

    constructor(name : string, type : string, className? : string, connectionString? : string,
                    schemaConnectionString? : string, data? : string, schemaData? : string, datasets? : DataSet[])

    #####JsonDatasSource Constructor

    constructor(name: string, connectionString?: string, data?: string, type : DatasourceTypeEnum = DatasourceTypeEnum.JSON)

    #####ODataDataSource Constructor

    constructor(name: string, connectionString: string, type : DatasourceTypeEnum = DatasourceTypeEnum.ODATA)

    #####SalesforceDataSource Constructor

    constructor(name: string, connectionString: string, type : DatasourceTypeEnum = DatasourceTypeEnum.SALESFORCE)

    #####SalesforceOAuthDataSOurce Constructor

    constructor(name: string, connectionString: string, type : DatasourceTypeEnum = DatasourceTypeEnum.SALESFORCEOAUTH)

    #####SqlDataSource Constructor

    constructor(name: string, connectionString?: string, data?: string, type : DatasourceTypeEnum = DatasourceTypeEnum.SQL)

    #####Xml_10DataSource Constructor

    constructor(name: string, connectionString?: string, data? : string, schemaConnectionString?: string, type : DatasourceTypeEnum = DatasourceTypeEnum.XML)

    #####Xml_20DataSource Constructor

    constructor(name: string, connectionString?: string, schemaData? : string, schemaConnectionString?: string, type : DatasourceTypeEnum = DatasourceTypeEnum.XML2)

    ####Template Constructor

    constructor(outputFormat : OutputFormatEnum, datasources : DataSource[], callback? : string, data? : string, connectionString? : string, format? : string, properties? : Property[],
                    parameters? : Parameter[],  tag? : string, trackImports? : boolean, trackErrors? : number, mainPrinter? : string,
                    firstPagePrinter? : string, printerJobName? : string, printCopies? : number, printDuplex? : string)

    Keywords

    none

    Install

    npm i windwardrestapi

    DownloadsWeekly Downloads

    3

    Version

    21.0.24

    License

    MIT

    Unpacked Size

    62.3 kB

    Total Files

    32

    Last publish

    Collaborators

    • zaidabuhijleh