Skip to content

Commit a4202d6

Browse files
committed
Version 0.0.1
1 parent f9e02a8 commit a4202d6

File tree

10 files changed

+13341
-1
lines changed

10 files changed

+13341
-1
lines changed

.github/workflows/npm-publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Npm Publish Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
publish-npm:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
registry-url: https://registry.npmjs.org/
19+
- run: npm ci
20+
- run: npm run build
21+
- run: npm publish --access public
22+
env:
23+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,6 @@ dist
128128
.yarn/build-state.yml
129129
.yarn/install-state.gz
130130
.pnp.*
131+
132+
nodemon.json
133+
test.ts

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
1-
# lemonsoft-api-client
1+
# lemonsoft-api-client
2+
3+
**LemonsoftApiClient** is a third party [Lemonsoft API](https://www.lemonsoft.fi/) client for NodeJS. It is a wrapper around an API client that has been [automatically generated](https://www.npmjs.com/package/swagger-typescript-api) using the [OpenAPI schema](https://rest-s01-prod02.lemonsoft.eu/Lemonsoft30/swagger/docs/v1) provided by Lemonsoft.
4+
5+
## Installation
6+
7+
Add to project's package.json:
8+
9+
```
10+
npm install @rantalainen/lemonsoft-api-client
11+
```
12+
13+
### Import to NodeJS project
14+
15+
```javascript
16+
const { LemonsoftApiClient } = require('@rantalainen/lemonsoft-api-client');
17+
```
18+
19+
### Import to TypeScript project
20+
21+
```javascript
22+
import { LemonsoftApiClient } from '@rantalainen/lemonsoft-api-client';
23+
```
24+
25+
## Setup client with options
26+
27+
```javascript
28+
const lemonsoft = new LemonsoftApiClient(
29+
{
30+
userName: 'example@example.com',
31+
password: 'password',
32+
database: 'LemonDBx',
33+
apiKey: 'api_key'
34+
},
35+
{
36+
baseURL: 'https://rest-s01-prod02.lemonsoft.eu/Lemonsoft30'
37+
}
38+
);
39+
```
40+
41+
Available methods can be found in the [API documentation](https://rest-s01-prod02.lemonsoft.eu/Lemonsoft30/swagger/ui/index).

0 commit comments

Comments
 (0)