1.2.9 • Published 4 months ago

@cloudhospital/integratedservicesfunctionsapp.client v1.2.9

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Azure Functions App Client

Overview

Client libaray for CloudHospital.IntegratedServicesFunctionsApp Azure Functions App.

Usages

Install

$ npm i --save @cloudhospital/integratedservicesfunctionsapp.client

Example

import { CreateGitHubIssueClient } from '@cloudhospital/integratedservicesfunctionsapp.client';
import { type GitHubIssueRequestModel } from '@cloudhospital/integratedservicesfunctionsapp.client';

// ...

const createGitHubIssueClient = new CreateGitHubIssueClient({
    apiKey: '<api-key>',
    baseUrl: '<Base url of Azure Functions App>',
});

let model: GitHubIssueRequestModel;

try {
    throw new Error('Test error');
} catch (err) {
    if (err instanceof Error) {
        model = {
            owner: process.env.OWNER ?? '',
            repo: process.env.REPO ?? '',
            stage: process.env.STAGE ?? '',
            error: {
                message: err.message,
                stack: err.stack,
            },
            note: `You can provide more information

**Markdown** supported. ;)

`,
        };

        await createGitHubIssueClient.requestAsync(model);
    }
}
1.2.9

4 months ago

1.2.8

5 months ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.3

1 year ago