From 4c0c194309314288cca97084a454e435a12b29e2 Mon Sep 17 00:00:00 2001 From: Fabian Date: Sun, 25 Nov 2018 21:11:03 +0100 Subject: [PATCH] Update README.md --- service-reporting/README.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/service-reporting/README.md b/service-reporting/README.md index 0fd645c..08ec2e9 100644 --- a/service-reporting/README.md +++ b/service-reporting/README.md @@ -1,19 +1,28 @@ # PDF Service -Provides an API interface to generate PDF reports for terms and their sentiment analysis results. The service uses an .NET Core wrapper for the wkhtmltopdf library to generate pdf out of html code. +Provides a REST-API to generate PDF reports for terms and their sentiment analysis results. The service uses an .NET Core wrapper for the wkhtmltopdf library to generate pdf out of html code. `GET`: `/` Shows a demo page - param: none - return: pdf file `POST`: `/generatePDF/` Generates a pdf report for the given terms -- param: Term[] as Content-Type: `application/json` +- param: Term[] as Content-Type: `application/json` e.g. body of request -```javascript +```json [ - { "name": "term 1", "sentiment": 0.1 }, - { "name": "term 2", "sentiment": 0.3 }, - { "name": "term 3", "sentiment": 0.7 } + { + "name": "term 1", + "sentiment": 0.1 + }, + { + "name": "term 2", + "sentiment": 0.3 + }, + { + "name": "term 3", + "sentiment": 0.7 + } ] ``` - return: pdf file @@ -24,7 +33,7 @@ Term(string `Name`, double `Sentiment`) ## run with docker - `docker build -t service-reporting .` -- `docker run -p YOUR_PORT:80 service-reporting:latest` +- `docker run -p YOUR_PORT:8083 service-reporting:latest` ## run local ### requirements -- 2.43.0