# tcn-service

> For the moment the package is WIP, more stuff to be added soon.

Latest version **1.0.4** (published 2021-08-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install tcn-service
pnpm add tcn-service
yarn add tcn-service
bun add tcn-service
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2021-08-05 |
| First published | 2021-07-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Horea |
| Maintainers | horeacrisantecss |
| Keywords | tcn-service |

## Links

- npm: https://www.npmjs.com/package/tcn-service
- npm.io page: https://npm.io/package/tcn-service

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.21.1
- [typescript](https://npm.io/package/typescript.md) ^4.3.5

## Recent versions

- 1.0.4 (latest) — 2021-08-05
- 1.0.2 — 2021-07-27

## README

# What is this?

For the moment the package is WIP, more stuff to be added soon.

---
## Installation:
`
npm install tcn-service
`
or
`
yarn add tcn-service
`

## Testing the package
```javascript
import { tcn } from 'tcn-service';

tcn(); //this should display a Success message
```

## Mocked Endpoints: 
___
```
[GET] on /formSchema 
```
```javascript
import { getMokedForm } from 'tcn-service';

async function returnRequestData() {
	const res = await getMokedForm('https://demo5655985.mockable.io');
	return res.data;
};
```
___
## Swagger Endpoints:

```javascript
import { ApiService } from 'tcn-service';

async function returnRequestData() {

  const apiServiceInstance = ApiService; //initialize class instance

  apiServiceInstance.setHeaders("http://20.82.216.130", "/data/salutations");
  // setHeaders takes the base URL as the first argument
  // the second argument is the rest of the API endpoint context

  const res = await apiServiceInstance.get();

  console.log(res.data);
}
```
___
Actions accepted on the instance: 
```javascript
.get()
```
```javascript
.get(id)
```
```javascript
.post(Payload ={})
```
```javascript
.post(Payload ={}, id)
```
```javascript
.delete(id)
```

---
_Source: https://npm.io/package/tcn-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
