]> git.somenet.org - pub/jan/aic18.git/blob - service-reporting/readme.md
Merge branch 'vagrant-provisioning' into 'master'
[pub/jan/aic18.git] / service-reporting / readme.md
1 # PDF Service
2
3 Provides an API interface to generate PDF reports for tweets and their sentiment analysis results. The service uses an .NET Core wrapper for the wkhtmltopdf library to generate pdf out of html code.
4
5 `GET`: `/` Shows a demo page  
6 - param: none
7 - return: pdf file
8
9 `POST`: `/generatePDF/` Generates a pdf report for the given tweets
10 - param: Tweet[] as Content-Type: `application/json`  
11 - return: pdf file
12
13 ### Tweet model
14 Tweet(string `Name`, string `Sentiment`)
15
16 ## run with docker
17
18 - `docker build -t service-reporting .`    
19 - `docker run -p YOUR_PORT:80 service-reporting:latest`
20
21 ## run local
22 ### requirements
23 - .net core 2.2
24
25 ### commands
26 - `dotnet run`