RESTful web service for booking calendar app.
It serves for connecting together all of the endpoints involved in this app: the web app itself on the client side, Iperbooking for retrieving booking and guests data, MySQL database with room and color assignments, Police web service for publishing arrived people data, ISTAT web service for similar data publishing purpose.
The API can run on both .NET Core and .NET Framework. If you chose to run on .NET Core set BookingCalendarApi as startup project and make sure that Package Manager Console is set to work with BookingCalendarApi.Repository.NETCore project for database operations. If instead you want to run on .NET Framework, the startup project must be BookingCalendarApi.NETFramework as well as the project for Package Manager Console.
For running the API locally do the following steps:
- Set user secrets for database and other:
dotnet user-secrets set "DB:ConnectionString" "Server=<mysql-server-address>; Database=<database-name>; Uid=<username>; Pwd=<password>"
dotnet user-secrets set "JWT:Key" "<your JWT key>"
dotnet user-secrets set "JWT:Issuer" "<your JWT issuer>"
dotnet user-secrets set "MasterPassword" "<password for master account>"
- Update database using PM console:
Update-Database
Or via .NET CLI:
dotnet database update
- Run it:
dotnet run
-
You can work either with Master hotel or you can create your own directly in the database. If you want to work with your own structure, you can add a user for it by calling POST api/v1/users endpoint.
-
For actually utilizing the critical features of the API, the credentials for Iperbooking, Portale Alloggiati and ISTAT must be provided. To configure those, from settings page in the app go to Chiavi API and configure all the required keys.
- Configured stage selection in AWS environment.
- Added support for hosting on AWS Lambda.
- Added support for .NET Framework 4.
- Introduced JWT authentication and role based authorization (only admin supported for now).
- Introduced structure which contains all its API secrets.
- Separating data at repository level which belongs to the structrue of the current user.
- Placed user related and structure data into single /users/current endpoint.
- Removed the concept of session.
- Collapsed assignments into single resource.
- Fixed collision detection.
- Added wether deposit is made with a bank transfer to booking response.
- Added deposit information to booking response.
- ISTAT data must be fetched first and then reuploaded, so that eventual changes could be consumed.
- Better validation and grouping of ISTAT data before send.
- Adjusted some specific nations that are missing in ISTAT documentaion, and other nation description typos.
- Added Pakistan nation.
- Reversed ISTAT nation descriptions as of version 1.2.1.
- Restored original Germany and USA country names, as it was giving errors in ISTAT.
- Adjusted nation descriptions in seeding for better ISTAT compatibility.
- Added exception filter. More advanced status codes handling.
- Handling connection errors and given correct status code for that.
- Added entities configurations. Seeding data directly from configuration.
- Added base board information to tiles.
- Fixed minor bugs.
- Fixed correct tracked records order by record type.
- Fixed missing date specified field in ISTAT publication.
- Added ISTAT endpoint to send new ISTAT data and to get last published date.
- Fixed wrong police data row serialization.
- Added nation descriptions to nations table.
- Better police place of birth search by description.
- Fixed simultaneous context bound stuff on police data generation.
- Fixed taking bookings from following date when publishing to police.