Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
Signed-off-by: ManAnRuck <[email protected]>
  • Loading branch information
ManAnRuck committed Jun 13, 2021
1 parent 748925e commit ec04efa
Show file tree
Hide file tree
Showing 10 changed files with 2,366 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/[email protected]

- name: Install and Build 🔧
run: |
yarn install
yarn gen
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
__generated
*.log
dist
docs
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
🚧 Still under Constructionn 🚧

# bt-dip-sdk

## Docs

https://demokratie-live.github.io/bt-dip-sdk/classes/dipapi.html

## Install

```
yarn add @democracy-deutschland/bt-dip-sdk
```

## Usagee

```ts
import { DipApi, Configuration } from "@democracy-deutschland/bt-dip-sdk";

const config = new Configuration({
apiKey: "ApiKey N64VhW8.yChkBUIJeosGojQ7CSR2xwLf3Qy7Apw464",
});

const api = new DipApi(config);

api
.getVorgaenge({
fDatumStart: "2020-06-01",
fDatumEnd: "2020-06-20",
})
.then(({ data }) => console.log(data))
.catch(console.error);
```
7 changes: 7 additions & 0 deletions openapitools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "5.1.1"
}
}
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@democracy-deutschland/bt-dip-sdk",
"version": "0.1.0-alpha.0",
"description": "Bundestag DIP - TypeScript SDK",
"main": "dist/index.js",
"author": "Manuel Ruck <[email protected]>",
"license": "Apache-2.0",
"repository": "https://github.com/demokratie-live/bt-dip-sdk",
"scripts": {
"build": "tsc",
"gen": "yarn gen-sdk && yarn gen-docs",
"gen-sdk": "openapi-generator-cli generate -o ./src/__generated -i ./swagger.yml -g typescript-axios --additional-properties=useSingleRequestParameter=true",
"gen-docs": "typedoc --out docs src/index.ts",
"test": "ts-node-dev src/tests/usage.ts"
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "^2.3.3",
"ts-node-dev": "^1.1.6",
"typedoc": "^0.20.36",
"typescript": "4.2"
}
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./__generated";
15 changes: 15 additions & 0 deletions src/tests/usage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { DipApi, Configuration } from "../index";

const config = new Configuration({
apiKey: "ApiKey N64VhW8.yChkBUIJeosGojQ7CSR2xwLf3Qy7Apw464",
});

const api = new DipApi(config);

api
.getVorgaenge({
fDatumStart: "2020-06-01",
fDatumEnd: "2020-06-20",
})
.then(({ data }) => console.log(data))
.catch(console.error);
Loading

0 comments on commit ec04efa

Please sign in to comment.