-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ManAnRuck <[email protected]>
- Loading branch information
Showing
10 changed files
with
2,366 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
__generated | ||
*.log | ||
dist | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./__generated"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Oops, something went wrong.